/**
 * Created by IntelliJ IDEA.
 * User: Tomek
 * Date: 08.10.12
 * Time: 21:30
 * To change this template use File | Settings | File Templates.
 */
package AS3.helpers {
import flash.display.BitmapData;

import flash.geom.Matrix;

import mx.controls.Alert;

import zakladki.renderers.*;

import mx.controls.Image;

public class FlagImageHelper {
    /*Flagi państw świata  */
    [Embed(source="../../assets/img/flagi/poland.png")]
    [Bindable]
    private static var polska_img:Class;
    [Embed(source="../../assets/img/flagi/austria.png")]
    [Bindable]
    private static var austria_img:Class;
    [Embed(source="../../assets/img/flagi/belarus.png")]
    [Bindable]
    private static var bialorus_img:Class;
    [Embed(source="../../assets/img/flagi/belgia.png")]
    [Bindable]
    private static var belgia_img:Class;
    [Embed(source="../../assets/img/flagi/bosnia_hercegowina.png")]
    [Bindable]
    private static var bosnia_hercegowina_img:Class;
    [Embed(source="../../assets/img/flagi/bulgaria.png")]
    [Bindable]
    private static var bulgaria_img:Class;
    [Embed(source="../../assets/img/flagi/czechy.png")]
    [Bindable]
    private static var czechy_img:Class;
    [Embed(source="../../assets/img/flagi/dania.png")]
    [Bindable]
    private static var dania_img:Class;
    [Embed(source="../../assets/img/flagi/estonia.png")]
    [Bindable]
    private static var estonia_img:Class;
    [Embed(source="../../assets/img/flagi/finlandia.png")]
    [Bindable]
    private static var finlandia_img:Class;
    [Embed(source="../../assets/img/flagi/francja.png")]
    [Bindable]
    private static var francja_img:Class;
    [Embed(source="../../assets/img/flagi/niemcy.png")]
    [Bindable]
    private static var niemcy_img:Class;
    [Embed(source="../../assets/img/flagi/grecja.png")]
    [Bindable]
    private static var grecja_img:Class;
    [Embed(source="../../assets/img/flagi/wegry.png")]
    [Bindable]
    private static var wegry_img:Class;
    [Embed(source="../../assets/img/flagi/islandia.png")]
    [Bindable]
    private static var islandia_img:Class;
    [Embed(source="../../assets/img/flagi/irlandia.png")]
    [Bindable]
    private static var irlandia_img:Class;
    [Embed(source="../../assets/img/flagi/wlochy.png")]
    [Bindable]
    private static var wlochy_img:Class;
    [Embed(source="../../assets/img/flagi/lotwa.png")]
    [Bindable]
    private static var lotwa_img:Class;
    [Embed(source="../../assets/img/flagi/litwa.png")]
    [Bindable]
    private static var litwa_img:Class;
    [Embed(source="../../assets/img/flagi/moldawia.png")]
    [Bindable]
    private static var moldawia_img:Class;
    [Embed(source="../../assets/img/flagi/Albania.png")]
    [Bindable]
    private static var albania_img:Class;
    [Embed(source="../../assets/img/flagi/chorwacja.png")]
    [Bindable]
    private static var chorwacja_img:Class;
    [Embed(source="../../assets/img/flagi/luxemburg.png")]
    [Bindable]
    private static var luxemburg_img:Class;
    [Embed(source="../../assets/img/flagi/macedonia.png")]
    [Bindable]
    private static var macedonia_img:Class;
    [Embed(source="../../assets/img/flagi/malta.png")]
    [Bindable]
    private static var malta_img:Class;
    [Embed(source="../../assets/img/flagi/holandia.png")]
    [Bindable]
    private static var holandia_img:Class;
    [Embed(source="../../assets/img/flagi/norwegia.png")]
    [Bindable]
    private static var norwegia_img:Class;
    [Embed(source="../../assets/img/flagi/portugalia.png")]
    [Bindable]
    private static var portugalia_img:Class;
    [Embed(source="../../assets/img/flagi/rumunia.png")]
    [Bindable]
    private static var rumunia_img:Class;
    [Embed(source="../../assets/img/flagi/serbia.png")]
    [Bindable]
    private static var serbia_img:Class;
    [Embed(source="../../assets/img/flagi/slowacja.png")]
    [Bindable]
    private static var slowacja_img:Class;
    [Embed(source="../../assets/img/flagi/slowenia.png")]
    [Bindable]
    private static var slowenia_img:Class;
    [Embed(source="../../assets/img/flagi/hiszpania.png")]
    [Bindable]
    private static var hiszpania_img:Class;
    [Embed(source="../../assets/img/flagi/szwecja.png")]
    [Bindable]
    private static var szwecja_img:Class;
    [Embed(source="../../assets/img/flagi/szwajcaria.png")]
    [Bindable]
    private static var szwajcaria_img:Class;
    [Embed(source="../../assets/img/flagi/ukraina.png")]
    [Bindable]
    private static var ukraina_img:Class;
    [Embed(source="../../assets/img/flagi/wielka_brytania.png")]
    [Bindable]
    private static var wielka_brytania_img:Class;

//*********************************** 		Azja		 **********************************************//
    [Embed(source="../../assets/img/flagi/afganistan.png")]
    [Bindable]
    private static var afganistan_img:Class;
    [Embed(source="../../assets/img/flagi/armenia.png")]
    [Bindable]
    private static var armenia_img:Class;
    [Embed(source="../../assets/img/flagi/azerbejdzan.png")]
    [Bindable]
    private static var azerbejdzan_img:Class;
    [Embed(source="../../assets/img/flagi/bahrain.png")]
    [Bindable]
    private static var bahrain_img:Class;
    [Embed(source="../../assets/img/flagi/bangladesz.png")]
    [Bindable]
    private static var bangladesz_img:Class;
    [Embed(source="../../assets/img/flagi/brunei.png")]
    [Bindable]
    private static var brunei_img:Class;
    [Embed(source="../../assets/img/flagi/kambodza.png")]
    [Bindable]
    private static var kambodza_img:Class;
    [Embed(source="../../assets/img/flagi/china.png")]
    [Bindable]
    private static var china_img:Class;
    [Embed(source="../../assets/img/flagi/cypr.png")]
    [Bindable]
    private static var cypr_img:Class;
    [Embed(source="../../assets/img/flagi/gruzja.png")]
    [Bindable]
    private static var gruzja_img:Class;
    [Embed(source="../../assets/img/flagi/indie.png")]
    [Bindable]
    private static var indie_img:Class;
    [Embed(source="../../assets/img/flagi/indonezja.png")]
    [Bindable]
    private static var indonezja_img:Class;
    [Embed(source="../../assets/img/flagi/iran.png")]
    [Bindable]
    private static var iran_img:Class;
    [Embed(source="../../assets/img/flagi/irak.png")]
    [Bindable]
    private static var irak_img:Class;
    [Embed(source="../../assets/img/flagi/izrael.png")]
    [Bindable]
    private static var izrael_img:Class;
    [Embed(source="../../assets/img/flagi/japan.png")]
    [Bindable]
    private static var japan_img:Class;
    [Embed(source="../../assets/img/flagi/jordania.png")]
    [Bindable]
    private static var jordania_img:Class;
    [Embed(source="../../assets/img/flagi/kazachstan.png")]
    [Bindable]
    private static var kazachstan_img:Class;
    [Embed(source="../../assets/img/flagi/korea_polnocna.png")]
    [Bindable]
    private static var korea_polnocna_img:Class;
    [Embed(source="../../assets/img/flagi/korea_poludniowa.png")]
    [Bindable]
    private static var korea_poludniowa_img:Class;
    [Embed(source="../../assets/img/flagi/kuwejt.png")]
    [Bindable]
    private static var kuwejt_img:Class;
    [Embed(source="../../assets/img/flagi/kirgistan.png")]
    [Bindable]
    private static var kirgistan_img:Class;
    [Embed(source="../../assets/img/flagi/liban.png")]
    [Bindable]
    private static var liban_img:Class;
    [Embed(source="../../assets/img/flagi/malezja.png")]
    [Bindable]
    private static var malezja_img:Class;
    [Embed(source="../../assets/img/flagi/birma.png")]
    [Bindable]
    private static var birma_img:Class;
    [Embed(source="../../assets/img/flagi/nepal.png")]
    [Bindable]
    private static var nepal_img:Class;
    [Embed(source="../../assets/img/flagi/oman.png")]
    [Bindable]
    private static var oman_img:Class;
    [Embed(source="../../assets/img/flagi/pakistan.png")]
    [Bindable]
    private static var pakistan_img:Class;
    [Embed(source="../../assets/img/flagi/filipiny.png")]
    [Bindable]
    private static var filipiny_img:Class;
    [Embed(source="../../assets/img/flagi/katar.png")]
    [Bindable]
    private static var qatar_img:Class;
    [Embed(source="../../assets/img/flagi/rosja.png")]
    [Bindable]
    private static var rosja_img:Class;
    [Embed(source="../../assets/img/flagi/arabia_saudyjska.png")]
    [Bindable]
    private static var arabia_saudyjska_img:Class;
    [Embed(source="../../assets/img/flagi/sri_lanka.png")]
    [Bindable]
    private static var sri_lanka_img:Class;
    [Embed(source="../../assets/img/flagi/singapur.png")]
    [Bindable]
    private static var singapur_img:Class;
    [Embed(source="../../assets/img/flagi/syria.png")]
    [Bindable]
    private static var syria_img:Class;
    [Embed(source="../../assets/img/flagi/taiwan.png")]
    [Bindable]
    private static var taiwan_img:Class;
    [Embed(source="../../assets/img/flagi/tadzykistan.png")]
    [Bindable]
    private static var tadzykistan_img:Class;
    [Embed(source="../../assets/img/flagi/tajlandia.png")]
    [Bindable]
    private static var tajlandia_img:Class;
    [Embed(source="../../assets/img/flagi/turcja.png")]
    [Bindable]
    private static var turcja_img:Class;
    [Embed(source="../../assets/img/flagi/turkmenistan.png")]
    [Bindable]
    private static var turkmenistan_img:Class;
    [Embed(source="../../assets/img/flagi/zjednoczone_emiraty_arabskie.png")]
    [Bindable]
    private static var zjednoczone_emiraty_arabskie_img:Class;
    [Embed(source="../../assets/img/flagi/uzbekistan.png")]
    [Bindable]
    private static var uzbekistan_img:Class;
    [Embed(source="../../assets/img/flagi/wietnam.png")]
    [Bindable]
    private static var wietnam_img:Class;
    [Embed(source="../../assets/img/flagi/jemen.png")]
    [Bindable]
    private static var jemen_img:Class;

    [Embed(source="../../assets/img/flagi/bhutan.png")]
    [Bindable]
    private static var bhutan_img:Class;
    [Embed(source="../../assets/img/flagi/mongolia.png")]
    [Bindable]
    private static var mongolia_img:Class;
    [Embed(source="../../assets/img/flagi/laos.png")]
    [Bindable]
    private static var laos_img:Class;
    [Embed(source="../../assets/img/flagi/papua_nowa_gwinea.png")]
    [Bindable]
    private static var papua_nowa_gwinea_img:Class;


//**************************************************************************************************************//

//********************      				Afryka									**************//
    [Embed(source="../../assets/img/flagi/algieria.png")]
    [Bindable]
    private static var algieria_img:Class;
    [Embed(source="../../assets/img/flagi/angola.png")]
    [Bindable]
    private static var angola_img:Class;
    [Embed(source="../../assets/img/flagi/benin.png")]
    [Bindable]
    private static var benin_img:Class;
    [Embed(source="../../assets/img/flagi/norwegia.png")]
    [Bindable]
    private static var botswana_img:Class;
    [Embed(source="../../assets/img/flagi/Kamerun.png")]
    [Bindable]
    private static var Kamerun_img:Class;
    [Embed(source="../../assets/img/flagi/republika_demokratyczna_kongo.png")]
    [Bindable]
    private static var republika_demokratyczna_kongo_img:Class;
    [Embed(source="../../assets/img/flagi/republika_kongo.png")]
    [Bindable]
    private static var republika_kongo_img:Class;
    [Embed(source="../../assets/img/flagi/egipt.png")]
    [Bindable]
    private static var egipt_img:Class;
    [Embed(source="../../assets/img/flagi/etiopia.png")]
    [Bindable]
    private static var etiopia_img:Class;
    [Embed(source="../../assets/img/flagi/gabon.png")]
    [Bindable]
    private static var gabon_img:Class;
    [Embed(source="../../assets/img/flagi/ghana.png")]
    [Bindable]
    private static var ghana_img:Class;
    [Embed(source="../../assets/img/flagi/kenia.png")]
    [Bindable]
    private static var kenia_img:Class;
    [Embed(source="../../assets/img/flagi/libia.png")]
    [Bindable]
    private static var libia_img:Class;
    [Embed(source="../../assets/img/flagi/maroko.png")]
    [Bindable]
    private static var maroko_img:Class;
    [Embed(source="../../assets/img/flagi/mozambik.png")]
    [Bindable]
    private static var mozambik_img:Class;
    [Embed(source="../../assets/img/flagi/namibia.png")]
    [Bindable]
    private static var namibia_img:Class;
    [Embed(source="../../assets/img/flagi/nigeria.png")]
    [Bindable]
    private static var nigeria_img:Class;
    [Embed(source="../../assets/img/flagi/senegal.png")]
    [Bindable]
    private static var senegal_img:Class;
    [Embed(source="../../assets/img/flagi/rpa.png")]
    [Bindable]
    private static var rpa_img:Class;
    [Embed(source="../../assets/img/flagi/sudan.png")]
    [Bindable]
    private static var sudan_img:Class;
    [Embed(source="../../assets/img/flagi/tanzania.png")]
    [Bindable]
    private static var tanzania_img:Class;
    [Embed(source="../../assets/img/flagi/togo.png")]
    [Bindable]
    private static var togo_img:Class;
    [Embed(source="../../assets/img/flagi/tunezja.png")]
    [Bindable]
    private static var tunezja_img:Class;
    [Embed(source="../../assets/img/flagi/trynidad_tobago.png")]
    [Bindable]
    private static var trynidad_tobago_img:Class;
    [Embed(source="../../assets/img/flagi/zambia.png")]
    [Bindable]
    private static var zambia_img:Class;
    [Embed(source="../../assets/img/flagi/zimbabwe.png")]
    [Bindable]
    private static var zimbabwe_img:Class;

    [Embed(source="../../assets/img/flagi/czad.png")]
    [Bindable]
    private static var czad_img:Class;
    [Embed(source="../../assets/img/flagi/mali.png")]
    [Bindable]
    private static var mali_img:Class;
    [Embed(source="../../assets/img/flagi/gwinea.png")]
    [Bindable]
    private static var gwinea_img:Class;
    [Embed(source="../../assets/img/flagi/burkina_faso.png")]
    [Bindable]
    private static var burkina_faso_img:Class;
    [Embed(source="../../assets/img/flagi/mauretania.png")]
    [Bindable]
    private static var mauretania_img:Class;
    [Embed(source="../../assets/img/flagi/liberia.png")]
    [Bindable]
    private static var liberia_img:Class;
    [Embed(source="../../assets/img/flagi/sierra_leone.png")]
    [Bindable]
    private static var sierra_leone_img:Class;
    [Embed(source="../../assets/img/flagi/niger.png")]
    [Bindable]
    private static var niger_img:Class;
    [Embed(source="../../assets/img/flagi/republika_srodkowoafrykanska.png")]
    [Bindable]
    private static var republika_srodkowoafrykanska_img:Class;
    [Embed(source="../../assets/img/flagi/gwinea_rownikowa.png")]
    [Bindable]
    private static var gwinea_rownikowa_img:Class;
    [Embed(source="../../assets/img/flagi/uganda.png")]
    [Bindable]
    private static var uganda_img:Class;
    [Embed(source="../../assets/img/flagi/somalia.png")]
    [Bindable]
    private static var somalia_img:Class;
    [Embed(source="../../assets/img/flagi/rwanda.png")]
    [Bindable]
    private static var rwanda_img:Class;
    [Embed(source="../../assets/img/flagi/madagaskar.png")]
    [Bindable]
    private static var madagaskar_img:Class;
    [Embed(source="../../assets/img/flagi/erytrea.png")]
    [Bindable]
    private static var erytrea_img:Class;
    [Embed(source="../../assets/img/flagi/lesotho.png")]
    [Bindable]
    private static var lesotho_img:Class;
    [Embed(source="../../assets/img/flagi/swaziland.png")]
    [Bindable]
    private static var swaziland_img:Class;

//***********************************************************************************************************//


//*****************************					Ameryki					***********************************//
    [Embed(source="../../assets/img/flagi/nowa_zelandia.png")]
    [Bindable]
    private static var nowa_zelandia_img:Class;
    [Embed(source="../../assets/img/flagi/kanada.png")]
    [Bindable]
    private static var kanada_img:Class;
    [Embed(source="../../assets/img/flagi/meksyk.png")]
    [Bindable]
    private static var meksyk_img:Class;
    [Embed(source="../../assets/img/flagi/USA.png")]
    [Bindable]
    private static var usa_img:Class;
    [Embed(source="../../assets/img/flagi/kostaryka.png")]
    [Bindable]
    private static var kostaryka_img:Class;
    [Embed(source="../../assets/img/flagi/kuba.png")]
    [Bindable]
    private static var kuba_img:Class;
    [Embed(source="../../assets/img/flagi/salvador.png")]
    [Bindable]
    private static var salvador_img:Class;
    [Embed(source="../../assets/img/flagi/gwatemala.png")]
    [Bindable]
    private static var gwatemala_img:Class;
    [Embed(source="../../assets/img/flagi/honduras.png")]
    [Bindable]
    private static var honduras_img:Class;
    [Embed(source="../../assets/img/flagi/nikaragua.png")]
    [Bindable]
    private static var nikaragua_img:Class;
    [Embed(source="../../assets/img/flagi/panama.png")]
    [Bindable]
    private static var panama_img:Class;
    [Embed(source="../../assets/img/flagi/dominikana.png")]
    [Bindable]
    private static var dominikana_img:Class;
    [Embed(source="../../assets/img/flagi/haiti.png")]
    [Bindable]
    private static var haiti_img:Class;
    [Embed(source="../../assets/img/flagi/jamajka.png")]
    [Bindable]
    private static var jamajka_img:Class;
    [Embed(source="../../assets/img/flagi/argentyna.png")]
    [Bindable]
    private static var argentyna_img:Class;
    [Embed(source="../../assets/img/flagi/boliwia.png")]
    [Bindable]
    private static var boliwia_img:Class;
    [Embed(source="../../assets/img/flagi/brazylia.png")]
    [Bindable]
    private static var brazylia_img:Class;
    [Embed(source="../../assets/img/flagi/chile.png")]
    [Bindable]
    private static var chile_img:Class;
    [Embed(source="../../assets/img/flagi/kolumbia.png")]
    [Bindable]
    private static var kolumbia_img:Class;
    [Embed(source="../../assets/img/flagi/ekwador.png")]
    [Bindable]
    private static var ekwador_img:Class;
    [Embed(source="../../assets/img/flagi/paragwaj.png")]
    [Bindable]
    private static var paragwaj_img:Class;
    [Embed(source="../../assets/img/flagi/peru.png")]
    [Bindable]
    private static var peru_img:Class;
    [Embed(source="../../assets/img/flagi/urugwaj.png")]
    [Bindable]
    private static var urugwaj_img:Class;
    [Embed(source="../../assets/img/flagi/wenezuela.png")]
    [Bindable]
    private static var wenezuela_img:Class;
    [Embed(source="../../assets/img/flagi/suriname.png")]
    [Bindable]
    private static var suriname_img:Class;
    [Embed(source="../../assets/img/flagi/belize.png")]
    [Bindable]
    private static var belize_img:Class;
    [Embed(source="../../assets/img/flagi/gujana.png")]
    [Bindable]
    private static var gujana_img:Class;
//***************************************************************************************************//
//
    [Embed(source="../../assets/img/flagi/australia.png")]
    [Bindable]
    private static var australia_img:Class;


    private static var countryColorMap:Object;

    private static function createCountriesColorMap():Object {
        var result:Object = {
            'Poland':"#9CBB57",
            'Albania':"#B9D875",
            'Austria':"#95B352",
            'Belarus':"#A2C061",
            'Belgium':"#83A43C",
            'Bosnia And Herzegovina':"#AACA64",
            'Bulgaria':"#B4D56A",
            'Croatia':"#A5C267",
            'Czech Republic':"#9ABE4C",
            'Denmark':"#8AA158",
            'Estonia':"#7E993F",
            'Finland':"#899F58",
            'France':"#809C41",
            'Germany':"#94B54C",
            'Greece':"#B7DC65",
            'Hungary':"#A0C452",
            'Iceland':"#779339",
            'Ireland':"#8BAA45",
            'Italy':"#9EBD59",
            'Latvia':"#8EAA50",
            'Lithuania':"#93B24F",
            'Luxembourg':"LUKSEMBURG",
            'Macedonia':"#B8DA6C",
            'Malta':"#9CBB57",
            'Moldova':"#AAC963",
            'Netherlands':"#8BAE43",
            'Norway':"#7B9444",
            'Portugal':"#869E50",
            'Romania':"#ACCE61",
            'Serbia And Montenegro':"#AECE67",
            'Slovak Republic':"#9BC245",
            'Slovenia':"#98B850",
            'Spain':"#849F48",
            'Sweden':"#82994e",
            'Switzerland':"#83A141s",
            'Ukraine':"#A4C756",
            'United Kingdom':"#819E40",
            'Afghanistan':"#DFCB60",
            'Armenia':"#D8C269",
            'Azerbaijan':"#D7C26E",
            'Bahrain':"BAHRAIN",
            'Bangladesh':"#EDDD6E",
            'Brunei':"BRUNEI",
            'Cambodia':"#E4968C",
            'China':"#CB7B71",
            'Cyprus':"CYPR",
            'Georgia':"#CFBE7D",
            'India':"#EDDA74",
            'Indonesia':"#E19B92",
            'Iran':"#DDC66B",
            'Iraq':"#D8C05F",
            'Israel':"#CAB04C",
            'Japan':"#DC7C70",
            'Jordan':"#D1BA60",
            'Kazakhstan':"#5D7148",
            'South Korea':"#D17C71",
            'North Korea':"#D77C71",
            'Kuwait':"#D6BC50",
            'Kyrgyz Republic':"#63784D",
            'Lebanon':"#E2C75C",
            'Malaysia':"#CB9583",
            'Myanmar':"#D07373",
            'Nepal':"#F1DB6C",
            'Oman':"#E8D174",
            'Pakistan':"#E7D26A",
            'Philippines':"#CB7E76",
            'Qatar':"KATAR",
            'Russian Federation':"#556A40",
            'Saudi Arabia':"#DDC668",
            'Singapore':"SINGAPUR",
            'Sri Lanka':"#F0E089",
            'Syrian Arab Republic':"#D0B755",
            'Taiwan':"#CB8A71",
            'Tajikistan':"#698052",
            'Thailand':"#CB8977",
            'Turkey':"#C9B04D",
            'Turkmenistan':"#7F916C",
            'United Arab Emirates':"#E4CD71",
            'Uzbekistan':"#657950",
            'Vietnam':"#E18F85",
            'Yemen':"#E3CC6E",
            'Bhutan':"#EDDB7F",
            'Mongolia':"#C3746A",
            'Laos':"#DB8F84",
            'Papua New Guinea':"#E8A69D",
            'Algeria':"#7F602E",
            'Angola':"#B4925B",
            'Benin':"#8E6E3C",
            'Botswana':"#C5A168",
            'Cameroon':"#A38048",
            'Congo Democratic Republic':"#AB8952",
            'Congo Republic':"#A98753",
            'IvoryCoast':"#9F8152",
            'Egypt':"#9E7A3F",
            'Ethiopia':"#B69153",
            'Gabon':"#B29059",
            'Ghana':"#937442",
            'Kenya':"#C39C5A",
            'Libya':"#967237",
            'Morocco':"#76592A",
            'Mozambique':"#D5B072",
            'Namibia':"#CDAA72",
            'Nigeria':"#8D6E3C",
            'Senegal':"#8E6E39",
            'South Africa':"#D6B37B",
            'Sudan':"#A48147",
            'Tanzania':"#C9A362",
            'Togo':"#997946",
            'Tunisia':"#8C6A33",
            'TrinidadAndTobago':"TRYNIDAD",
            'Zambia':"#B69156",
            'Zimbabwe':"#BE995F",
            'Swaziland':"#CFAB6F",
            'Chad':"#9C7941",
            'West Sahara':"#7B5F31",
            'Mali':"#8C6E3E",
            'Guinea':"#9C7F50",
            'Burkina Faso':"#907241",
            'Mauritania':"#886937",
            'Liberia':"#A88D61",
            'Sierra Leone':"#A28658",
            'Niger':"#866736",
            'Central African Republic':"#A4814A",
            'Equatorial Guinea':"#A47C41",
            'Uganda':"#AB8950",
            'Somalia':"#C29954",
            'Rwanda':"#B1894B",
            'Madagascar':"#DDB572",
            'Eritrea':"#A98242",
            'Lesotho':"#C99A51",
            'Australia':"#5D9F9D",
            'New Zealand':"#73B0B5",
            'Canada':"#66879D",
            'Mexico':"#87ACC6",
            'United States':"#779DB7",
            'Costa Rica':"#92CCCE",
            'Cuba':"#8FBEC1",
            'Guatemala':"#72B1B3",
            'Honduras':"#7EBBBD",
            'Nicaragua':"#8BC2C4",
            'Panama':"#9ACFD1",
            'Dominican Republic':"#52A896",
            'Haiti':"#80BEBE",
            'Jamaica':"#67B4B6",
            'Argentina':"#5BA38A",
            'Bolivia':"#4A9279",
            'Brazil':"#46948E",
            'Chile':"#649A87",
            'Colombia':"#367772",
            'Ecuador':"#45856F",
            'Paraguay':"#539A81",
            'Peru':"#4D8C76",
            'Uruguay':"#509E83",
            'Venezuela':"#418577",
            'FrenchGuyana':"#519272",
            'Suriname':"#54927C",
            'El Salvador':"#8FC2C4",
            'Belize':"#77B9BB",
            'Guyana':"#4C8E77"
        };

        return result;
    }

    public static function getCountryColor(countryName:String):String {
        if(countryColorMap == null){
            countryColorMap = createCountriesColorMap();
        }
        var s:String = countryName.replace(new RegExp(/\\s+/g),"");
        return countryColorMap[s];
    }

    public static function fillFlagImageAndNameByColor(objParam:Object,flagImg:Image,eraseFlagIfNotFound:Boolean):void {

        /*********************   Europa    *******************/
        if (eraseFlagIfNotFound) {
            flagImg.source = "";
        }
        objParam.country = "";
        objParam.nazwa = "";

        if (objParam.kod_koloru == "#9CBB57") {
            objParam.nazwa = "Polska";
            flagImg.source = polska_img;
            objParam.country = "Poland";
        }
        if (objParam.kod_koloru == "#B9D875") {
            objParam.nazwa = "Albania";
            flagImg.source = albania_img;
            objParam.country = "Albania";
        }
        if (objParam.kod_koloru == "#95B352") {
            objParam.nazwa = "Austria";
            flagImg.source = austria_img;
            objParam.country = "Austria";
        }
        if (objParam.kod_koloru == "#A2C061") {
            objParam.nazwa = "Białoruś";
            flagImg.source = bialorus_img;
            objParam.country = "Belarus";
        }
        if (objParam.kod_koloru == "#83A43C") {
            objParam.nazwa = "Belgia";
            flagImg.source = belgia_img;
            objParam.country = "Belgium";
        }
        if (objParam.kod_koloru == "#AACA64") {
            objParam.nazwa = "Bośnia i Hercegowina";
            flagImg.source = bosnia_hercegowina_img;
            objParam.country = "Bosnia and Herzegovina";
        }
        if (objParam.kod_koloru == "#B4D56A") {
            objParam.nazwa = "Bułgaria";
            flagImg.source = bulgaria_img;
            objParam.country = "Bulgaria";
        }
        if (objParam.kod_koloru == "#A5C267") {
            objParam.nazwa = "Chorwacja";
            flagImg.source = chorwacja_img;
            objParam.country = "Croatia";
        }
        if (objParam.kod_koloru == "#9ABE4C") {
            objParam.nazwa = "Republika Czech";
            flagImg.source = czechy_img;
            objParam.country = "Czech Republic";
        }
        if (objParam.kod_koloru == "#8AA158") {
            objParam.nazwa = "Dania";
            flagImg.source = dania_img;
            objParam.country = "Denmark";
        }
        if (objParam.kod_koloru == "#7E993F") {
            objParam.nazwa = "Estonia";
            flagImg.source = estonia_img;
            objParam.country = "Estonia";
        }
        if (objParam.kod_koloru == "#899F58") {
            objParam.nazwa = "Finlandia";
            flagImg.source = finlandia_img;
            objParam.country = "Finland";
        }
        if (objParam.kod_koloru == "#809C41") {
            objParam.nazwa = "Francja";
            flagImg.source = francja_img;
            objParam.country = "France";
        }
        if (objParam.kod_koloru == "#94B54C") {
            objParam.nazwa = "Niemcy";
            flagImg.source = niemcy_img;
            objParam.country = "Germany";
        }
        if (objParam.kod_koloru == "#B7DC65") {
            objParam.nazwa = "Grecja";
            flagImg.source = grecja_img;
            objParam.country = "Greece";
        }
        if (objParam.kod_koloru == "#A0C452") {
            objParam.nazwa = "Węgry";
            flagImg.source = wegry_img;
            objParam.country = "Hungary";
        }
        if (objParam.kod_koloru == "#779339") {
            objParam.nazwa = "Islandia";
            flagImg.source = islandia_img;
            objParam.country = "Iceland";
        }
        if (objParam.kod_koloru == "#8BAA45") {
            objParam.nazwa = "Irlandia";
            flagImg.source = irlandia_img;
            objParam.country = "Ireland";
        }
        if (objParam.kod_koloru == "#9EBD59") {
            objParam.nazwa = "Włochy";
            flagImg.source = wlochy_img;
            objParam.country = "Italy";
        }
        if (objParam.kod_koloru == "#8EAA50") {
            objParam.nazwa = "Łotwa";
            flagImg.source = lotwa_img;
            objParam.country = "Latvia";
        }
        if (objParam.kod_koloru == "#93B24F") {
            objParam.nazwa = "Litwa";
            flagImg.source = litwa_img;
            objParam.country = "Lithuania";
        }
        //if(objParam.kod_koloru == "LUKSEMBURG"){objParam.nazwa = "Luksemburg"; img_flaga.source=luxemburg_img;objParam.country="Luxembourg";}
        if (objParam.kod_koloru == "#B8DA6C") {
            objParam.nazwa = "Macedonia";
            flagImg.source = macedonia_img;
            objParam.country = "Macedonia, FYR";
        }
        //if(objParam.kod_koloru == "#9CBB57"){objParam.nazwa = "Malta"; img_flaga.source=malta_img;objParam.country="Malta";}
        if (objParam.kod_koloru == "#AAC963") {
            objParam.nazwa = "Mołdawia";
            flagImg.source = moldawia_img;
            objParam.country = "Moldova";
        }
        if (objParam.kod_koloru == "#8BAE43") {
            objParam.nazwa = "Holandia";
            flagImg.source = holandia_img;
            objParam.country = "Netherlands";
        }
        if (objParam.kod_koloru == "#7B9444") {
            objParam.nazwa = "Norwegia";
            flagImg.source = norwegia_img;
            objParam.country = "Norway";
        }
        if (objParam.kod_koloru == "#869E50") {
            objParam.nazwa = "Portugalia";
            flagImg.source = portugalia_img;
            objParam.country = "Portugal";
        }
        if (objParam.kod_koloru == "#ACCE61") {
            objParam.nazwa = "Rumunia";
            flagImg.source = rumunia_img;
            objParam.country = "Romania";
        }
        if (objParam.kod_koloru == "#AECE67") {
            objParam.nazwa = "Serbia i Czarnogóra";
            flagImg.source = serbia_img;
            objParam.country = "Serbia and Montenegro";
        }
        if (objParam.kod_koloru == "#9BC245") {
            objParam.nazwa = "Słowacja";
            flagImg.source = slowacja_img;
            objParam.country = "Slovak Republic";
        }
        if (objParam.kod_koloru == "#98B850") {
            objParam.nazwa = "Słowenia";
            flagImg.source = slowenia_img;
            objParam.country = "Slovenia";
        }
        if (objParam.kod_koloru == "#849F48") {
            objParam.nazwa = "Hiszpania";
            flagImg.source = hiszpania_img;
            objParam.country = "Spain";
        }
        if (objParam.kod_koloru == "#83A141") {
            objParam.nazwa = "Szwajcaria";
            flagImg.source = szwajcaria_img;
            objParam.country = "Switzerland";
        }
        if (objParam.kod_koloru == "#82994E") {
            objParam.nazwa = "Szwecja";
            flagImg.source = szwecja_img;
            objParam.country = "Sweden";
        }
        if (objParam.kod_koloru == "#A4C756") {
            objParam.nazwa = "Ukraina";
            flagImg.source = ukraina_img;
            objParam.country = "Ukraine";
        }
        if (objParam.kod_koloru == "#819E40") {
            objParam.nazwa = "Wielka Brytania";
            flagImg.source = wielka_brytania_img;
            objParam.country = "United Kingdom";
        }


        /*********************   /Europa    *******************/


        /*********************   Azja    *******************/

        if (objParam.kod_koloru == "#DFCB60") {
            objParam.nazwa = "Afganistan";
            flagImg.source = afganistan_img;
            objParam.country = "Afghanistan";
        }
        if (objParam.kod_koloru == "#D8C269") {
            objParam.nazwa = "Armenia";
            flagImg.source = armenia_img;
            objParam.country = "Armenia";
        }
        if (objParam.kod_koloru == "#D7C26E") {
            objParam.nazwa = "Azerbejdżan";
            flagImg.source = azerbejdzan_img;
            objParam.country = "Azerbaijan";
        }
        if (objParam.kod_koloru == "BAHRAIN") {
            objParam.nazwa = "Królestwo Bahrajnu";
            flagImg.source = bahrain_img;
            objParam.country = "Bahrain";
        }
        if (objParam.kod_koloru == "#EDDD6E") {
            objParam.nazwa = "Bangladesz";
            flagImg.source = bangladesz_img;
            objParam.country = "Bangladesh";
        }
        if (objParam.kod_koloru == "BRUNEI") {
            objParam.nazwa = "Brunei";
            flagImg.source = brunei_img;
            objParam.country = "Brunei";
        }
        if (objParam.kod_koloru == "#E4968C") {
            objParam.nazwa = "Kambodża";
            flagImg.source = kambodza_img;
            objParam.country = "Cambodia";
        }
        if (objParam.kod_koloru == "#CB7B71") {
            objParam.nazwa = "Chiny";
            flagImg.source = china_img;
            objParam.country = "China";
        }
        if (objParam.kod_koloru == "CYPR") {
            objParam.nazwa = "Cypr";
            flagImg.source = cypr_img;
            objParam.country = "Cyprus";
        }
        if (objParam.kod_koloru == "#CFBE7D") {
            objParam.nazwa = "Gruzja";
            flagImg.source = gruzja_img;
            objParam.country = "Georgia";
        }
        if (objParam.kod_koloru == "#EDDA74") {
            objParam.nazwa = "Indie";
            flagImg.source = indie_img;
            objParam.country = "India";
        }
        if (objParam.kod_koloru == "#E19B92") {
            objParam.nazwa = "Indonezja";
            flagImg.source = indonezja_img;
            objParam.country = "Indonesia";
        }
        if (objParam.kod_koloru == "#DDC66B") {
            objParam.nazwa = "Iran";
            flagImg.source = iran_img;
            objParam.country = "Iran";
        }
        if (objParam.kod_koloru == "#D8C05F") {
            objParam.nazwa = "Irak";
            flagImg.source = irak_img;
            objParam.country = "Iraq";
        }
        if (objParam.kod_koloru == "#CAB04C") {
            objParam.nazwa = "Izrael";
            flagImg.source = izrael_img;
            objParam.country = "Israel";
        }
        if (objParam.kod_koloru == "#DC7C70") {
            objParam.nazwa = "Japonia";
            flagImg.source = japan_img;
            objParam.country = "Japan";
        }
        if (objParam.kod_koloru == "#D1BA60") {
            objParam.nazwa = "Jordania";
            flagImg.source = jordania_img;
            objParam.country = "Jordan";
        }
        if (objParam.kod_koloru == "#5D7148") {
            objParam.nazwa = "Kazachstan";
            flagImg.source = kazachstan_img;
            objParam.country = "Kazakhstan";
        }
        if (objParam.kod_koloru == "#D17C71") {
            objParam.nazwa = "Korea Północna";
            flagImg.source = korea_polnocna_img;
            objParam.country = "North Korea";
        }
        if (objParam.kod_koloru == "#D77C71") {
            objParam.nazwa = "Korea Południowa";
            flagImg.source = korea_poludniowa_img;
            objParam.country = "South Korea";
        }
        if (objParam.kod_koloru == "#D6BC50") {
            objParam.nazwa = "Kuwejt";
            flagImg.source = kuwejt_img;
            objParam.country = "Kuwait";
        }
        if (objParam.kod_koloru == "#63784D") {
            objParam.nazwa = "Kirgistan";
            flagImg.source = kirgistan_img;
            objParam.country = "Kyrgyz Republic";
        }
        if (objParam.kod_koloru == "#E2C75C") {
            objParam.nazwa = "Liban";
            flagImg.source = liban_img;
            objParam.country = "Lebanon";
        }
        if (objParam.kod_koloru == "#CB9583") {
            objParam.nazwa = "Malezja";
            flagImg.source = malezja_img;
            objParam.country = "Malaysia";
        }
        if (objParam.kod_koloru == "#D07373") {
            objParam.nazwa = "Birma";
            flagImg.source = birma_img;
            objParam.country = "Myanmar";
        }
        if (objParam.kod_koloru == "#F1DB6C") {
            objParam.nazwa = "Nepal";
            flagImg.source = nepal_img;
            objParam.country = "Nepal";
        }
        if (objParam.kod_koloru == "#E8D174") {
            objParam.nazwa = "Oman";
            flagImg.source = oman_img;
            objParam.country = "Oman";
        }
        if (objParam.kod_koloru == "#E7D26A") {
            objParam.nazwa = "Pakistan";
            flagImg.source = pakistan_img;
            objParam.country = "Pakistan";
        }
        if (objParam.kod_koloru == "#CB7E76") {
            objParam.nazwa = "Filipiny";
            flagImg.source = filipiny_img;
            objParam.country = "Philippines";
        }
        if (objParam.kod_koloru == "KATAR") {
            objParam.nazwa = "Katar";
            flagImg.source = filipiny_img;
            objParam.country = "Qatar";
        }
        if (objParam.kod_koloru == "#556A40") {
            objParam.nazwa = "Federacja Rosyjska";
            flagImg.source = rosja_img;
            objParam.country = "Russian Federation";
        }
        if (objParam.kod_koloru == "#DDC668") {
            objParam.nazwa = "Arabia Saudyjska";
            flagImg.source = arabia_saudyjska_img;
            objParam.country = "Saudi Arabia";
        }
        if (objParam.kod_koloru == "SINGAPUR") {
            objParam.nazwa = "Singapur";
            flagImg.source = singapur_img;
            objParam.country = "Singapore";
        }
        if (objParam.kod_koloru == "#F0E089") {
            objParam.nazwa = "Sri Lanka";
            flagImg.source = sri_lanka_img;
            objParam.country = "Sri Lanka";
        }
        if (objParam.kod_koloru == "#D0B755") {
            objParam.nazwa = "Syria";
            flagImg.source = syria_img;
            objParam.country = "Syrian Arab Republic";
        }
        if (objParam.kod_koloru == "#CB8A71") {
            objParam.nazwa = "Tajwan";
            flagImg.source = taiwan_img;
            objParam.country = "Taiwan";
        }
        if (objParam.kod_koloru == "#698052") {
            objParam.nazwa = "Tadżykistan";
            flagImg.source = tadzykistan_img;
            objParam.country = "Tajikistan";
        }
        if (objParam.kod_koloru == "#CB8977") {
            objParam.nazwa = "Tajlandia";
            flagImg.source = tajlandia_img;
            objParam.country = "Thailand";
        }
        if (objParam.kod_koloru == "#C9B04D") {
            objParam.nazwa = "Turcja";
            flagImg.source = turcja_img;
            objParam.country = "Turkey";
        }
        if (objParam.kod_koloru == "#7F916C") {
            objParam.nazwa = "Turkmenistan";
            flagImg.source = turkmenistan_img;
            objParam.country = "Turkmenistan";
        }
        if (objParam.kod_koloru == "#E4CD71") {
            objParam.nazwa = "Zjednoczone Emiraty Arabskie";
            flagImg.source = zjednoczone_emiraty_arabskie_img;
            objParam.country = "United Arab Emirates";
        }
        if (objParam.kod_koloru == "#657950") {
            objParam.nazwa = "Uzbekistan";
            flagImg.source = uzbekistan_img;
            objParam.country = "Uzbekistan";
        }
        if (objParam.kod_koloru == "#E18F85") {
            objParam.nazwa = "Wietnam";
            flagImg.source = wietnam_img;
            objParam.country = "Vietnam";
        }
        if (objParam.kod_koloru == "#E3CC6E") {
            objParam.nazwa = "Jemen";
            flagImg.source = jemen_img;
            objParam.country = "Yemen";
        }
//Do uzupełnienia

        if (objParam.kod_koloru == "#EDDB7F") {
            objParam.nazwa = "Bhutan";
            flagImg.source = bhutan_img;
            objParam.country = "Bhutan";
        }
        if (objParam.kod_koloru == "#C3746A") {
            objParam.nazwa = "Mongolia";
            flagImg.source = mongolia_img;
            objParam.country = "Mongolia";
        }
        if (objParam.kod_koloru == "#DB8F84") {
            objParam.nazwa = "Laos";
            flagImg.source = laos_img;
            objParam.country = "Laos";
        }
        if (objParam.kod_koloru == "#E8A69D") {
            objParam.nazwa = "Papua Nowa Gwinea";
            flagImg.source = papua_nowa_gwinea_img;
            objParam.country = "Papua New Guinea";
        }


        /*********************   /Azja    *******************/

        /*********************   Afryka    *******************/
        if (objParam.kod_koloru == "#7F602E") {
            objParam.nazwa = "Algeria";
            flagImg.source = algieria_img;
            objParam.country = "Algeria";
        }
        if (objParam.kod_koloru == "#B4925B") {
            objParam.nazwa = "Angola";
            flagImg.source = angola_img;
            objParam.country = "Angola";
        }
        if (objParam.kod_koloru == "#8E6E3C") {
            objParam.nazwa = "Benin";
            flagImg.source = benin_img;
            objParam.country = "Benin";
        }
        if (objParam.kod_koloru == "#C5A168") {
            objParam.nazwa = "Botswana";
            flagImg.source = botswana_img;
            objParam.country = "Botswana";
        }
        if (objParam.kod_koloru == "#A38048") {
            objParam.nazwa = "Kamerun";
            flagImg.source = Kamerun_img;
            objParam.country = "Cameroon";
        }
        if (objParam.kod_koloru == "#AB8952") {
            objParam.nazwa = "Republika Demokratyczna Kongo";
            flagImg.source = republika_demokratyczna_kongo_img;
            objParam.country = "Congo Democratic Republic";
        }
        if (objParam.kod_koloru == "#A98753") {
            objParam.nazwa = "Republika Kongo";
            flagImg.source = republika_kongo_img;
            objParam.country = "Congo Republic";
        }
        if (objParam.kod_koloru == "#9F8152") {
            objParam.nazwa = "Wybrzeże Kości Słoniowej";
            flagImg.source = egipt_img;
            objParam.country = "IvoryCoast";
        }
        if (objParam.kod_koloru == "#9E7A3F") {
            objParam.nazwa = "Egipt";
            flagImg.source = egipt_img;
            objParam.country = "Egypt";
        }
        if (objParam.kod_koloru == "#B69153") {
            objParam.nazwa = "Etiopia";
            flagImg.source = etiopia_img;
            objParam.country = "Ethiopia";
        }
        if (objParam.kod_koloru == "#B29059") {
            objParam.nazwa = "Gabon";
            flagImg.source = gabon_img;
            objParam.country = "Gabon";
        }
        if (objParam.kod_koloru == "#937442") {
            objParam.nazwa = "Ghana";
            flagImg.source = ghana_img;
            objParam.country = "Ghana";
        }
        if (objParam.kod_koloru == "#C39C5A") {
            objParam.nazwa = "Kenia";
            flagImg.source = kenia_img;
            objParam.country = "Kenya";
        }
        if (objParam.kod_koloru == "#967237") {
            objParam.nazwa = "Libia";
            flagImg.source = libia_img;
            objParam.country = "Libya";
        }
        if (objParam.kod_koloru == "#76592A") {
            objParam.nazwa = "Maroko";
            flagImg.source = maroko_img;
            objParam.country = "Morocco";
        }
        if (objParam.kod_koloru == "#D5B072") {
            objParam.nazwa = "Mozambik";
            flagImg.source = mozambik_img;
            objParam.country = "Mozambique";
        }
        if (objParam.kod_koloru == "#A47C41") {
            objParam.nazwa = "Gwinea";
            flagImg.source = gwinea_img;
            objParam.country = "Gwinea";
        }


        if (objParam.kod_koloru == "#CDAA72") {
            objParam.nazwa = "Namibia";
            flagImg.source = namibia_img;
            objParam.country = "Namibia";
        }
        if (objParam.kod_koloru == "#8D6E3C") {
            objParam.nazwa = "Nigeria";
            flagImg.source = nigeria_img;
            objParam.country = "Nigeria";
        }
        if (objParam.kod_koloru == "#8E6E39") {
            objParam.nazwa = "Senegal";
            flagImg.source = senegal_img;
            objParam.country = "Senegal";
        }
        if (objParam.kod_koloru == "#D6B37B") {
            objParam.nazwa = "Republika Południowej Afryki";
            flagImg.source = rpa_img;
            objParam.country = "South Africa";
        }
        if (objParam.kod_koloru == "#A48147") {
            objParam.nazwa = "Sudan";
            flagImg.source = sudan_img;
            objParam.country = "Sudan";
        }
        if (objParam.kod_koloru == "#C9A362") {
            objParam.nazwa = "Tanzania";
            flagImg.source = tanzania_img;
            objParam.country = "Tanzania";
        }
        if (objParam.kod_koloru == "#997946") {
            objParam.nazwa = "Togo";
            flagImg.source = togo_img;
            objParam.country = "Togo";
        }
        if (objParam.kod_koloru == "#8C6A33") {
            objParam.nazwa = "Tunezja";
            flagImg.source = tunezja_img;
            objParam.country = "Tunisia";
        }
        if (objParam.kod_koloru == "TRYNIDAD") {
            objParam.nazwa = "Trinidad i Tobago";
            flagImg.source = trynidad_tobago_img;
            objParam.country = "TrinidadAndTobago";
        }
        if (objParam.kod_koloru == "#B69156") {
            objParam.nazwa = "Zambia";
            flagImg.source = zambia_img;
            objParam.country = "Zambia";
        }
        if (objParam.kod_koloru == "#BE995F") {
            objParam.nazwa = "Zimbabwe";
            flagImg.source = zimbabwe_img;
            objParam.country = "Zimbabwe";
        }
//Do uzupełnienia

        if (objParam.kod_koloru == "#CFAB6F") {
            objParam.nazwa = "Swaziland";
            flagImg.source = swaziland_img;
            objParam.country = "Swaziland";
        }
        if (objParam.kod_koloru == "#9C7941") {
            objParam.nazwa = "Czad";
            flagImg.source = czad_img;
            objParam.country = "Chad";
        }
        if (objParam.kod_koloru == "#7B5F31") {
            objParam.nazwa = "Zachodnia Sachara";
            flagImg.source = '';
            objParam.country = "West Sahara";
        }
        if (objParam.kod_koloru == "#8C6E3E") {
            objParam.nazwa = "Mali";
            flagImg.source = mali_img;
            objParam.country = "Mali";
        }
        if (objParam.kod_koloru == "#9C7F50") {
            objParam.nazwa = "Gwinea";
            flagImg.source = gwinea_img;
            objParam.country = "Guinea";
        }
        if (objParam.kod_koloru == "#907241") {
            objParam.nazwa = "Burkina faso";
            flagImg.source = burkina_faso_img;
            objParam.country = "Burkina Faso";
        }
        if (objParam.kod_koloru == "#886937") {
            objParam.nazwa = "Mauretania";
            flagImg.source = mauretania_img;
            objParam.country = "Mauritania";
        }
        if (objParam.kod_koloru == "#A88D61") {
            objParam.nazwa = "Liberia";
            flagImg.source = liberia_img;
            objParam.country = "Liberia";
        }
        if (objParam.kod_koloru == "#A28658") {
            objParam.nazwa = "Sierra Leone";
            flagImg.source = sierra_leone_img;
            objParam.country = "Sierra Leone";
        }
        if (objParam.kod_koloru == "#866736") {
            objParam.nazwa = "Republika Nigru";
            flagImg.source = niger_img;
            objParam.country = "Niger";
        }
        if (objParam.kod_koloru == "#A4814A") {
            objParam.nazwa = "Republika środkowoafrykańska";
            flagImg.source = republika_srodkowoafrykanska_img;
            objParam.country = "Central African Republic";
        }
        if (objParam.kod_koloru == "#A47C41") {
            objParam.nazwa = "Gwinea równikowa";
            flagImg.source = gwinea_rownikowa_img;
            objParam.country = "Equatorial Guinea";
        }
        if (objParam.kod_koloru == "#AB8950") {
            objParam.nazwa = "Uganda";
            flagImg.source = uganda_img;
            objParam.country = "Uganda";
        }
        if (objParam.kod_koloru == "#C29954") {
            objParam.nazwa = "Somalia";
            flagImg.source = somalia_img;
            objParam.country = "Somalia";
        }
        if (objParam.kod_koloru == "#B1894B") {
            objParam.nazwa = "Rwanda";
            flagImg.source = rwanda_img;
            objParam.country = "Rwanda";
        }
        if (objParam.kod_koloru == "#DDB572") {
            objParam.nazwa = "Madagaskar";
            flagImg.source = madagaskar_img;
            objParam.country = "Madagascar";
        }
        if (objParam.kod_koloru == "#A98242") {
            objParam.nazwa = "Erytrea";
            flagImg.source = erytrea_img;
            objParam.country = "Eritrea";
        }
        if (objParam.kod_koloru == "#C99A51") {
            objParam.nazwa = "Lesotho";
            flagImg.source = lesotho_img;
            objParam.country = "Lesotho";
        }


        /*********************   /Afryka    *******************/
        /*********************   Australia    *******************/
        if (objParam.kod_koloru == "#5D9F9D") {
            objParam.nazwa = "Australia";
            flagImg.source = australia_img;
            objParam.country = "Australia";
        }
        if (objParam.kod_koloru == "#73B0B5") {
            objParam.nazwa = "Nowa Zelandia";
            flagImg.source = nowa_zelandia_img;
            objParam.country = "New Zealand";
        }

        /*********************   /Australia    *******************/

        /*********************   Ameryka Północna i Centralna    *******************/
        if (objParam.kod_koloru == "#66879D") {
            objParam.nazwa = "Kanada";
            flagImg.source = kanada_img;
            objParam.country = "Canada";
        }
        if (objParam.kod_koloru == "#87ACC6") {
            objParam.nazwa = "Meksyk";
            flagImg.source = meksyk_img;
            objParam.country = "Mexico";
        }
        if (objParam.kod_koloru == "#779DB7") {
            objParam.nazwa = "USA";
            flagImg.source = usa_img;
            objParam.country = "United States";
        }
        if (objParam.kod_koloru == "#92CCCE") {
            objParam.nazwa = "Kostaryka";
            flagImg.source = kostaryka_img;
            objParam.country = "Costa Rica";
        }
        if (objParam.kod_koloru == "#8FBEC1") {
            objParam.nazwa = "Kuba";
            flagImg.source = kuba_img;
            objParam.country = "Cuba";
        }
        if (objParam.kod_koloru == "#90C4C6") {
            objParam.nazwa = "Salwador";
            flagImg.source = salvador_img;
            objParam.country = "El Salvador";
        }
        if (objParam.kod_koloru == "#72B1B3") {
            objParam.nazwa = "Gwatemala";
            flagImg.source = gwatemala_img;
            objParam.country = "Guatemala";
        }
        if (objParam.kod_koloru == "#7EBBBD") {
            objParam.nazwa = "Honduras";
            flagImg.source = honduras_img;
            objParam.country = "Honduras";
        }
        if (objParam.kod_koloru == "#8BC2C4") {
            objParam.nazwa = "Nikaragua";
            flagImg.source = nikaragua_img;
            objParam.country = "Nicaragua";
        }
        if (objParam.kod_koloru == "#9ACFD1") {
            objParam.nazwa = "Panama";
            flagImg.source = panama_img;
            objParam.country = "Panama";
        }
        if (objParam.kod_koloru == "#52A896") {
            objParam.nazwa = "Republika Dominikany";
            flagImg.source = dominikana_img;
            objParam.country = "Dominican Republic";
        }
        if (objParam.kod_koloru == "#80BEBE") {
            objParam.nazwa = "Haiti";
            flagImg.source = haiti_img;
            objParam.country = "Haiti";
        }
        if (objParam.kod_koloru == "#67B4B6") {
            objParam.nazwa = "Jamajka";
            flagImg.source = jamajka_img;
            objParam.country = "Jamaica";
        }
        /*********************   /Ameryka Północna i Centralna   *******************/

        if (objParam.kod_koloru == "#5BA38A") {
            objParam.nazwa = "Argentyna";
            flagImg.source = argentyna_img;
            objParam.country = "Argentina";
        }
        if (objParam.kod_koloru == "#4A9279") {
            objParam.nazwa = "Boliwia";
            flagImg.source = boliwia_img;
            objParam.country = "Bolivia";
        }
        if (objParam.kod_koloru == "#46948E") {
            objParam.nazwa = "Brazylia";
            flagImg.source = brazylia_img;
            objParam.country = "Brazil";
        }
        if (objParam.kod_koloru == "#649A87") {
            objParam.nazwa = "Chile";
            flagImg.source = chile_img;
            objParam.country = "Chile";
        }
        if (objParam.kod_koloru == "#367772") {
            objParam.nazwa = "Kolumbia";
            flagImg.source = kolumbia_img;
            objParam.country = "Colombia";
        }
        if (objParam.kod_koloru == "#45856F") {
            objParam.nazwa = "Ekwador";
            flagImg.source = ekwador_img;
            objParam.country = "Ecuador";
        }
        if (objParam.kod_koloru == "#539A81") {
            objParam.nazwa = "Paragwaj";
            flagImg.source = paragwaj_img;
            objParam.country = "Paraguay";
        }
        if (objParam.kod_koloru == "#4D8C76") {
            objParam.nazwa = "Peru";
            flagImg.source = peru_img;
            objParam.country = "Peru";
        }
        if (objParam.kod_koloru == "#509E83") {
            objParam.nazwa = "Urugwaj";
            flagImg.source = urugwaj_img;
            objParam.country = "Uruguay";
        }
        if (objParam.kod_koloru == "#418577") {
            objParam.nazwa = "Wenezuela";
            flagImg.source = wenezuela_img;
            objParam.country = "Venezuela";
        }

        if (objParam.kod_koloru == "#519272") {
            objParam.nazwa = "Gujana francuska";
            flagImg.source = francja_img;
            objParam.country = "FrenchGuyana";
        }
        if (objParam.kod_koloru == "#54927C") {
            objParam.nazwa = "Suriname";
            flagImg.source = suriname_img;
            objParam.country = "Suriname";
        }
        if (objParam.kod_koloru == "#8FC2C4") {
            objParam.nazwa = "El Salvador";
            flagImg.source = salvador_img;
            objParam.country = "El Salvador";
        }
        if (objParam.kod_koloru == "#77B9BB") {
            objParam.nazwa = "Belize";
            flagImg.source = belize_img;
            objParam.country = "Belize";
        }
        if (objParam.kod_koloru == "#4C8E77") {
            objParam.nazwa = "Gujana";
            flagImg.source = gujana_img;
            objParam.country = "Guyana";
        }
        if (objParam.kod_koloru == "") {
            objParam.nazwa = objParam.country = "";
        }


    }

    public static function getCountryName(nativeCountryName:String):String {
        var objParam:Object = {nazwa_panstwa:nativeCountryName,country:null};
        fillFlagImageAndNameByNativeName(objParam);
        return objParam.country;
    }


    public static function fillFlagImageAndNameByNativeName(objParam:Object):void {

        /*********************   Europa    *******************/
        objParam.country = "";
        objParam.continent = "";

        if (objParam.nazwa_panstwa == "Poland" || objParam.nazwa_panstwa == "Polska") {
            objParam.nazwa = "Polska";

            if (objParam.hasOwnProperty('source')) {
                objParam.source = new polska_img().bitmapData;
            }
            if (objParam.hasOwnProperty('image')) {
                objParam.image.source = polska_img;
            }
            objParam.country = "Poland";
        }
        if (objParam.nazwa_panstwa == "Albania" || objParam.nazwa_panstwa == "Albania") {
            objParam.nazwa = "Albania";

            if (objParam.hasOwnProperty('source')) {
                objParam.source = new albania_img().bitmapData;
            }
            if (objParam.hasOwnProperty('image')) {
                objParam.image.source = albania_img;
            }
            objParam.country = "Albania";
        }
        if (objParam.nazwa_panstwa == "Austria" || objParam.nazwa_panstwa == "Austria") {
            objParam.nazwa = "Austria";

            if (objParam.hasOwnProperty('source')) {
                objParam.source = new austria_img().bitmapData;
            }
            if (objParam.hasOwnProperty('image')) {
                objParam.image.source = austria_img;
            }
            objParam.country = "Austria";

        }
        if (objParam.nazwa_panstwa == "Belarus" || objParam.nazwa_panstwa == "Białoruś") {
            objParam.nazwa = "Białoruś";

            if (objParam.hasOwnProperty('source')) {
                objParam.source = new bialorus_img().bitmapData;
            }
            if (objParam.hasOwnProperty('image')) {
                objParam.image.source = bialorus_img;
            }
            objParam.country = "Belarus";
        }
        if (objParam.nazwa_panstwa == "Belgium" || objParam.nazwa_panstwa == "Belgia") {
            try {
                objParam.nazwa = "Belgia";
                if (objParam.hasOwnProperty('source')) {
                    objParam.source = new belgia_img().bitmapData;
                }
                if (objParam.hasOwnProperty('image')) {
                    objParam.image.source = belgia_img;
                }
                objParam.country = "Belgium";
            } catch(e:Error) {
                Alert.show('Sth wrong with Belgium' + e.message);
            }
        }
        if (objParam.nazwa_panstwa == "Bosnia and Herzegovina" || objParam.nazwa_panstwa == "Bośnia i Hercegowina") {
            objParam.nazwa = "Bośnia i Hercegowina";

            if (objParam.hasOwnProperty('source')) {
                objParam.source = new bosnia_hercegowina_img().bitmapData;
            }
            if(objParam.hasOwnProperty('image')) {
                objParam.image.source =bosnia_hercegowina_img;
            }
            objParam.country = "Bosnia and Herzegovina";
        }
        if (objParam.nazwa_panstwa == "Bulgaria" || objParam.nazwa_panstwa == "Bułgaria") {
            objParam.nazwa = "Bułgaria";

            if (objParam.hasOwnProperty('source')) {
                objParam.source = new bulgaria_img().bitmapData;
            } if(objParam.hasOwnProperty('image')) {
                objParam.image.source =bulgaria_img;
            }
            objParam.country = "Bulgaria";
        }
        if (objParam.nazwa_panstwa == "Croatia" || objParam.nazwa_panstwa == "Chorwacja") {
            objParam.nazwa = "Chorwacja";

            if (objParam.hasOwnProperty('source')) {
                objParam.source = new chorwacja_img().bitmapData;
            }
            if(objParam.hasOwnProperty('image')) {
                objParam.image.source =chorwacja_img;
            }
            objParam.country = "Croatia";
        }
        if (objParam.nazwa_panstwa == "Czech Republic" || objParam.nazwa_panstwa == "Republika Czech") {
            objParam.nazwa = "Republika Czech";

            if (objParam.hasOwnProperty('source')) {
                objParam.source = new czechy_img().bitmapData;
            }
            if(objParam.hasOwnProperty('image')) {
                objParam.image.source =czechy_img;
            }
            objParam.country = "Czech Republic";
        }
        if (objParam.nazwa_panstwa == "Denmark" || objParam.nazwa_panstwa == "Dania") {
            objParam.nazwa = "Dania";

            if (objParam.hasOwnProperty('source')) {
                objParam.source = new dania_img().bitmapData;
            }
            if(objParam.hasOwnProperty('image')) {
                objParam.image.source =dania_img;
            }
            objParam.country = "Denmark";
        }
        if (objParam.nazwa_panstwa == "Estonia" || objParam.nazwa_panstwa == "Estonia") {
            objParam.nazwa = "Estonia";

            if (objParam.hasOwnProperty('source')) {
                objParam.source = new estonia_img().bitmapData;
            }
            if(objParam.hasOwnProperty('image')) {
                objParam.image.source = estonia_img;
            }
            objParam.country = "Estonia";
        }
        if (objParam.nazwa_panstwa == "Finland" || objParam.nazwa_panstwa == "Finlandia") {
            objParam.nazwa = "Finlandia";
            if(objParam.hasOwnProperty('source')) {
                objParam.source = new finlandia_img().bitmapData;
            }
            objParam.country = "Finland";
        }
        if (objParam.nazwa_panstwa == "France" || objParam.nazwa_panstwa == "Francja") {
            objParam.nazwa = "Francja";

            if (objParam.hasOwnProperty('source')) {
                objParam.source = new francja_img().bitmapData;
            }
            if(objParam.hasOwnProperty('image')) {
                objParam.image.source =francja_img;
            }
            objParam.country = "France";
        }
        if (objParam.nazwa_panstwa == "Germany" || objParam.nazwa_panstwa == "Niemcy") {
            objParam.nazwa = "Niemcy";

            if (objParam.hasOwnProperty('source')) {
                objParam.source = new niemcy_img().bitmapData;
            }
            if(objParam.hasOwnProperty('image')) {
                objParam.image.source =niemcy_img;
            }
            objParam.country = "Germany";
        }
        if (objParam.nazwa_panstwa == "Greece" || objParam.nazwa_panstwa == "Grecja") {
            objParam.nazwa = "Grecja";

            if (objParam.hasOwnProperty('source')) {
                objParam.source = new grecja_img().bitmapData;
            }
            if(objParam.hasOwnProperty('image')) {
                objParam.image.source =grecja_img;
            }
            objParam.country = "Greece";
        }
        if (objParam.nazwa_panstwa == "Hungary" || objParam.nazwa_panstwa == "Węgry") {
            objParam.nazwa = "Węgry";

            if (objParam.hasOwnProperty('source')) {
                objParam.source = new wegry_img().bitmapData;
            }
            if(objParam.hasOwnProperty('image')) {
                objParam.image.source =wegry_img;
            }
            objParam.country = "Hungary";
        }
        if (objParam.nazwa_panstwa == "Iceland" || objParam.nazwa_panstwa == "Islandia") {
            objParam.nazwa = "Islandia";

            if (objParam.hasOwnProperty('source')) {
                objParam.source = new islandia_img().bitmapData;
            }
            if(objParam.hasOwnProperty('image')) {
                objParam.image.source =islandia_img;
            }
            objParam.country = "Iceland";
        }
        if (objParam.nazwa_panstwa == "Ireland" || objParam.nazwa_panstwa == "Irlandia") {
            objParam.nazwa = "Irlandia";

            if (objParam.hasOwnProperty('source')) {
                objParam.source = new irlandia_img().bitmapData;
            }
            if(objParam.hasOwnProperty('image')) {
                objParam.image.source =irlandia_img;
            }
            objParam.country = "Ireland";
        }
        if (objParam.nazwa_panstwa == "Italy" || objParam.nazwa_panstwa == "Włochy") {
            objParam.nazwa = "Włochy";

            if (objParam.hasOwnProperty('source')) {
                objParam.source = new wlochy_img().bitmapData;
            }
            if(objParam.hasOwnProperty('image')) {
                objParam.image.source =wlochy_img;
            }
            objParam.country = "Italy";
        }
        if (objParam.nazwa_panstwa == "Latvia" || objParam.nazwa_panstwa == "Łotwa") {
            objParam.nazwa = "Łotwa";

            if (objParam.hasOwnProperty('source')) {
                objParam.source = new lotwa_img().bitmapData;
            }
            if(objParam.hasOwnProperty('image')) {
                objParam.image.source =lotwa_img;
            }
            objParam.country = "Latvia";
        }
        if (objParam.nazwa_panstwa == "Lithuania" || objParam.nazwa_panstwa == "Litwa") {
            objParam.nazwa = "Litwa";

            if (objParam.hasOwnProperty('source')) {
                objParam.source = new litwa_img().bitmapData;
            }
            if(objParam.hasOwnProperty('image')) {
                objParam.image.source =litwa_img;
            }
            objParam.country = "Lithuania";
        }
        if (objParam.nazwa_panstwa == "Luxembourg" || objParam.nazwa_panstwa == "Luksemburg") {
            objParam.nazwa = "Luksemburg";

            if (objParam.hasOwnProperty('source')) {
                objParam.source = new luxemburg_img().bitmapData;
            }
            if(objParam.hasOwnProperty('image')) {
                objParam.image.source =luxemburg_img;
            }
            objParam.country = "Luxembourg";
        }
        if (objParam.nazwa_panstwa == "Macedonia, FYR" || objParam.nazwa_panstwa == "Macedonia") {
            objParam.nazwa = "Macedonia";

            if (objParam.hasOwnProperty('source')) {
                objParam.source = new macedonia_img().bitmapData;
            }
            if(objParam.hasOwnProperty('image')) {
                objParam.image.source =macedonia_img;
            }
            objParam.country = "Macedonia, FYR";
        }
        if (objParam.nazwa_panstwa == "Malta" || objParam.nazwa_panstwa == "Malta") {
            objParam.nazwa = "Malta";

            if (objParam.hasOwnProperty('source')) {
                objParam.source = new malta_img().bitmapData;
            }
            if(objParam.hasOwnProperty('image')) {
                objParam.image.source =malta_img;
            }
            objParam.country = "Malta";
        }
        if (objParam.nazwa_panstwa == "Moldova" || objParam.nazwa_panstwa == "Mołdawia") {
            objParam.nazwa = "Mołdawia";

            if (objParam.hasOwnProperty('source')) {
                objParam.source = new moldawia_img().bitmapData;
            }
            if(objParam.hasOwnProperty('image')) {
                objParam.image.source =moldawia_img;
            }
            objParam.country = "Moldova";
        }
        if (objParam.nazwa_panstwa == "Netherlands" || objParam.nazwa_panstwa == "Holandia") {
            objParam.nazwa = "Holandia";

            if (objParam.hasOwnProperty('source')) {
                objParam.source = new holandia_img().bitmapData;
            }
            if(objParam.hasOwnProperty('image')) {
                objParam.image.source =holandia_img;
            }
            objParam.country = "Netherlands";
        }
        if (objParam.nazwa_panstwa == "Norway" || objParam.nazwa_panstwa == "Norwegia") {
            objParam.nazwa = "Norwegia";

            if (objParam.hasOwnProperty('source')) {
                objParam.source = new norwegia_img().bitmapData;
            }
            if(objParam.hasOwnProperty('image')) {
                objParam.image.source =norwegia_img;
            }
            objParam.country = "Norway";
        }
        if (objParam.nazwa_panstwa == "Portugal" || objParam.nazwa_panstwa == "Portugalia") {
            objParam.nazwa = "Portugalia";

            if (objParam.hasOwnProperty('source')) {
                objParam.source = new portugalia_img().bitmapData;
            }
            if(objParam.hasOwnProperty('image')) {
                objParam.image.source =portugalia_img;
            }
            objParam.country = "Portugal";
        }
        if (objParam.nazwa_panstwa == "Romania" || objParam.nazwa_panstwa == "Rumunia") {
            objParam.nazwa = "Rumunia";

            if (objParam.hasOwnProperty('source')) {
                objParam.source = new rumunia_img().bitmapData;
            }
            if(objParam.hasOwnProperty('image')) {
                objParam.image.source =rumunia_img;
            }
            objParam.country = "Romania";
        }
        if (objParam.nazwa_panstwa == "Serbia and Montenegro" || objParam.nazwa_panstwa == "Serbia i Czarnogóra") {
            objParam.nazwa = "Serbia i Czarnogóra";

            if (objParam.hasOwnProperty('source')) {
                objParam.source = new serbia_img().bitmapData;
            }
            if(objParam.hasOwnProperty('image')) {
                objParam.image.source =serbia_img;
            }
            objParam.country = "Serbia and Montenegro";
        }
        if (objParam.nazwa_panstwa == "Slovak Republic" || objParam.nazwa_panstwa == "Słowacja") {
            objParam.nazwa = "Słowacja";

            if (objParam.hasOwnProperty('source')) {
                objParam.source = new slowacja_img().bitmapData;
            }
            if(objParam.hasOwnProperty('image')) {
                objParam.image.source =slowacja_img;
            }
            objParam.country = "Slovak Republic";
        }
        if (objParam.nazwa_panstwa == "Slovenia" || objParam.nazwa_panstwa == "Słowenia") {
            objParam.nazwa = "Słowenia";

            if (objParam.hasOwnProperty('source')) {
                objParam.source = new slowenia_img().bitmapData;
            }
            if(objParam.hasOwnProperty('image')) {
                objParam.image.source =slowenia_img;
            }
            objParam.country = "Slovenia";
        }
        if (objParam.nazwa_panstwa == "Spain" || objParam.nazwa_panstwa == "Hiszpania") {
            objParam.nazwa = "Hiszpania";

            if (objParam.hasOwnProperty('source')) {
                objParam.source = new hiszpania_img().bitmapData;
            }
            if(objParam.hasOwnProperty('image')) {
                objParam.image.source =hiszpania_img;
            }
            objParam.country = "Spain";
        }
        if (objParam.nazwa_panstwa == "Sweden" || objParam.nazwa_panstwa == "Szwecja") {
            objParam.nazwa = "Szwecja";

            if (objParam.hasOwnProperty('source')) {
                objParam.source = new szwecja_img().bitmapData;
            }
            if(objParam.hasOwnProperty('image')) {
                objParam.image.source =szwecja_img;
            }
            objParam.country = "Sweden";
        }
        if (objParam.nazwa_panstwa == "Switzerland" || objParam.nazwa_panstwa == "Szwajcaria") {
            objParam.nazwa = "Szwajcaria";

            if (objParam.hasOwnProperty('source')) {
                var swBmd:BitmapData = new szwajcaria_img().bitmapData;
                var matrix:Matrix = new Matrix();
                matrix.scale(22/swBmd.width, 15/swBmd.height);
                var scaledBitmap:BitmapData = new BitmapData(22,15);
                scaledBitmap.draw(swBmd, matrix);
                swBmd.dispose();
                objParam.source = scaledBitmap;
            }
            objParam.country = "Switzerland";
        }
        if (objParam.nazwa_panstwa == "Ukraine" || objParam.nazwa_panstwa == "Ukraina") {
            objParam.nazwa = "Ukraina";

            if (objParam.hasOwnProperty('source')) {
                objParam.source = new ukraina_img().bitmapData;
            }
            if(objParam.hasOwnProperty('image')) {
                objParam.image.source =ukraina_img;
            }
            objParam.country = "Ukraine";
        }
        if (objParam.nazwa_panstwa == "United Kingdom" || objParam.nazwa_panstwa == "Wielka Brytania") {
            objParam.nazwa = "Wielka Brytania";

            if (objParam.hasOwnProperty('source')) {
                objParam.source = new wielka_brytania_img().bitmapData;
            }
            if(objParam.hasOwnProperty('image')) {
                objParam.image.source =wielka_brytania_img;
            }
            objParam.country = "United Kingdom";
        }

        if(objParam.country != ""){
            objParam.continent = "Europe";
        }


        /*********************   /Europa    *******************/


        /*********************   Azja    *******************/

        if (objParam.nazwa_panstwa == "Afghanistan" || objParam.nazwa_panstwa == "Afganistan") {
            objParam.nazwa = "Afganistan";

            if (objParam.hasOwnProperty('source')) {
                objParam.source = new afganistan_img().bitmapData;
            }
            if(objParam.hasOwnProperty('image')) {
                objParam.image.source =afganistan_img;
            }
            objParam.country = "Afghanistan";
        }
        if (objParam.nazwa_panstwa == "Armenia" || objParam.nazwa_panstwa == "Armenia") {
            objParam.nazwa = "Armenia";

            if (objParam.hasOwnProperty('source')) {
                objParam.source = new armenia_img().bitmapData;
            }
            if(objParam.hasOwnProperty('image')) {
                objParam.image.source =armenia_img;
            }
            objParam.country = "Armenia";
        }
        if (objParam.nazwa_panstwa == "Azerbaijan" || objParam.nazwa_panstwa == "Azerbejdżan") {
            objParam.nazwa = "Azerbejdżan";

            if (objParam.hasOwnProperty('source')) {
                objParam.source = new azerbejdzan_img().bitmapData;
            }
            if(objParam.hasOwnProperty('image')) {
                objParam.image.source =azerbejdzan_img;
            }
            objParam.country = "Azerbaijan";
        }
        if (objParam.nazwa_panstwa == "Bahrain" || objParam.nazwa_panstwa == "Królestwo Bahrajnu") {
            objParam.nazwa = "Królestwo Bahrajnu";

            if (objParam.hasOwnProperty('source')) {
                objParam.source = new bahrain_img().bitmapData;
            }
            if(objParam.hasOwnProperty('image')) {
                objParam.image.source =bahrain_img;
            }
            objParam.country = "Bahrain";
        }
        if (objParam.nazwa_panstwa == "Bangladesh" || objParam.nazwa_panstwa == "Bangladesz") {
            objParam.nazwa = "Bangladesz";

            if (objParam.hasOwnProperty('source')) {
                objParam.source = new bangladesz_img().bitmapData;
            }
            if(objParam.hasOwnProperty('image')) {
                objParam.image.source =bangladesz_img;
            }
            objParam.country = "Bangladesh";
        }
        if (objParam.nazwa_panstwa == "Brunei" || objParam.nazwa_panstwa == "Brunei") {
            objParam.nazwa = "Brunei";

            if (objParam.hasOwnProperty('source')) {
                objParam.source = new brunei_img().bitmapData;
            }
            if(objParam.hasOwnProperty('image')) {
                objParam.image.source =brunei_img;
            }
            objParam.country = "Brunei";
        }
        if (objParam.nazwa_panstwa == "Cambodia" || objParam.nazwa_panstwa == "Kambodża") {
            objParam.nazwa = "Kambodża";

            if (objParam.hasOwnProperty('source')) {
                objParam.source = new kambodza_img().bitmapData;
            }
            if(objParam.hasOwnProperty('image')) {
                objParam.image.source =kambodza_img;
            }
            objParam.country = "Cambodia";
        }
        if (objParam.nazwa_panstwa == "China" || objParam.nazwa_panstwa == "Chiny") {
            objParam.nazwa = "Chiny";

            if (objParam.hasOwnProperty('source')) {
                objParam.source = new china_img().bitmapData;
            }
            if(objParam.hasOwnProperty('image')) {
                objParam.image.source =china_img;
            }
            objParam.country = "China";
        }
        if (objParam.nazwa_panstwa == "Cyprus" || objParam.nazwa_panstwa == "Cypr") {
            objParam.nazwa = "Cypr";

            if (objParam.hasOwnProperty('source')) {
                objParam.source = new cypr_img().bitmapData;
            }
            if(objParam.hasOwnProperty('image')) {
                objParam.image.source =cypr_img;
            }
            objParam.country = "Cyprus";
        }
        if (objParam.nazwa_panstwa == "Georgia" || objParam.nazwa_panstwa == "Gruzja") {
            objParam.nazwa = "Gruzja";

            if (objParam.hasOwnProperty('source')) {
                objParam.source = new gruzja_img().bitmapData;
            }
            if(objParam.hasOwnProperty('image')) {
                objParam.image.source =gruzja_img;
            }
            objParam.country = "Georgia";
        }
        if (objParam.nazwa_panstwa == "India" || objParam.nazwa_panstwa == "Indie") {
            objParam.nazwa = "Indie";

            if (objParam.hasOwnProperty('source')) {
                objParam.source = new indie_img().bitmapData;
            }
            if(objParam.hasOwnProperty('image')) {
                objParam.image.source =indie_img;
            }
            objParam.country = "India";
        }
        if (objParam.nazwa_panstwa == "Indonesia" || objParam.nazwa_panstwa == "Indonezja") {
            objParam.nazwa = "Indonezja";

            if (objParam.hasOwnProperty('source')) {
                objParam.source = new indonezja_img().bitmapData;
            }
            if(objParam.hasOwnProperty('image')) {
                objParam.image.source =indonezja_img;
            }
            objParam.country = "Indonesia";
        }
        if (objParam.nazwa_panstwa == "Iran" || objParam.nazwa_panstwa == "Iran") {
            objParam.nazwa = "Iran";

            if (objParam.hasOwnProperty('source')) {
                objParam.source = new iran_img().bitmapData;
            }
            if(objParam.hasOwnProperty('image')) {
                objParam.image.source =iran_img;
            }
            objParam.country = "Iran";
        }
        if (objParam.nazwa_panstwa == "Iraq" || objParam.nazwa_panstwa == "Irak") {
            objParam.nazwa = "Irak";

            if (objParam.hasOwnProperty('source')) {
                objParam.source = new irak_img().bitmapData;
            }
            if(objParam.hasOwnProperty('image')) {
                objParam.image.source =irak_img;
            }
            objParam.country = "Iraq";
        }
        if (objParam.nazwa_panstwa == "Israel" || objParam.nazwa_panstwa == "Izrael") {
            objParam.nazwa = "Izrael";

            if (objParam.hasOwnProperty('source')) {
                objParam.source = new izrael_img().bitmapData;
            }
            if(objParam.hasOwnProperty('image')) {
                objParam.image.source =izrael_img;
            }
            objParam.country = "Israel";
        }
        if (objParam.nazwa_panstwa == "Japan" || objParam.nazwa_panstwa == "Japonia") {
            objParam.nazwa = "Japonia";

            if (objParam.hasOwnProperty('source')) {
                objParam.source = new japan_img().bitmapData;
            }
            if(objParam.hasOwnProperty('image')) {
                objParam.image.source =japan_img;
            }
            objParam.country = "Japan";
        }
        if (objParam.nazwa_panstwa == "Jordan" || objParam.nazwa_panstwa == "Jordania") {
            objParam.nazwa = "Jordania";

            if (objParam.hasOwnProperty('source')) {
                objParam.source = new jordania_img().bitmapData;
            }
            if(objParam.hasOwnProperty('image')) {
                objParam.image.source =jordania_img;
            }
            objParam.country = "Jordan";
        }
        if (objParam.nazwa_panstwa == "Kazakhstan" || objParam.nazwa_panstwa == "Kazachstan") {
            objParam.nazwa = "Kazachstan";

            if (objParam.hasOwnProperty('source')) {
                objParam.source = new kazachstan_img().bitmapData;
            }
            if(objParam.hasOwnProperty('image')) {
                objParam.image.source =kazachstan_img;
            }
            objParam.country = "Kazakhstan";
        }
        if (objParam.nazwa_panstwa == "North Korea" || objParam.nazwa_panstwa == "Korea Północna") {
            objParam.nazwa = "Korea Północna";

            if (objParam.hasOwnProperty('source')) {
                objParam.source = new korea_polnocna_img().bitmapData;
            }
            if(objParam.hasOwnProperty('image')) {
                objParam.image.source =korea_polnocna_img;
            }
            objParam.country = "North Korea";
        }
        if (objParam.nazwa_panstwa == "South Korea" || objParam.nazwa_panstwa == "Korea Południowa") {
            objParam.nazwa = "Korea Południowa";

            if (objParam.hasOwnProperty('source')) {
                objParam.source = new korea_poludniowa_img().bitmapData;
            }
            if(objParam.hasOwnProperty('image')) {
                objParam.image.source =korea_poludniowa_img;
            }
            objParam.country = "South Korea";
        }
        if (objParam.nazwa_panstwa == "Kuwait" || objParam.nazwa_panstwa == "Kuwejt") {
            objParam.nazwa = "Kuwejt";

            if (objParam.hasOwnProperty('source')) {
                objParam.source = new kuwejt_img().bitmapData;
            }
            if(objParam.hasOwnProperty('image')) {
                objParam.image.source =kuwejt_img;
            }
            objParam.country = "Kuwait";
        }
        if (objParam.nazwa_panstwa == "Kyrgyz Republic" || objParam.nazwa_panstwa == "Kirgistan") {
            objParam.nazwa = "Kirgistan";

            if (objParam.hasOwnProperty('source')) {
                objParam.source = new kirgistan_img().bitmapData;
            }
            if(objParam.hasOwnProperty('image')) {
                objParam.image.source =kirgistan_img;
            }
            objParam.country = "Kyrgyz Republic";
        }
        if (objParam.nazwa_panstwa == "Lebanon" || objParam.nazwa_panstwa == "Liban") {
            objParam.nazwa = "Liban";

            if (objParam.hasOwnProperty('source')) {
                objParam.source = new liban_img().bitmapData;
            }
            if(objParam.hasOwnProperty('image')) {
                objParam.image.source =liban_img;
            }
            objParam.country = "Lebanon";
        }
        if (objParam.nazwa_panstwa == "Malaysia" || objParam.nazwa_panstwa == "Malezja") {
            objParam.nazwa = "Malezja";

            if (objParam.hasOwnProperty('source')) {
                objParam.source = new malezja_img().bitmapData;
            }
            if(objParam.hasOwnProperty('image')) {
                objParam.image.source =malezja_img;
            }
            objParam.country = "Malaysia";
        }
        if (objParam.nazwa_panstwa == "Myanmar" || objParam.nazwa_panstwa == "Birma") {
            objParam.nazwa = "Birma";

            if (objParam.hasOwnProperty('source')) {
                objParam.source = new birma_img().bitmapData;
            }
            if(objParam.hasOwnProperty('image')) {
                objParam.image.source =birma_img;
            }
            objParam.country = "Myanmar";
        }
        if (objParam.nazwa_panstwa == "Nepal" || objParam.nazwa_panstwa == "Nepal") {
            objParam.nazwa = "Nepal";

            if (objParam.hasOwnProperty('source')) {
                objParam.source = new nepal_img().bitmapData;
            }
            if(objParam.hasOwnProperty('image')) {
                objParam.image.source =nepal_img;
            }
            objParam.country = "Nepal";
        }
        if (objParam.nazwa_panstwa == "Oman" || objParam.nazwa_panstwa == "Oman") {
            objParam.nazwa = "Oman";

            if (objParam.hasOwnProperty('source')) {
                objParam.source = new oman_img().bitmapData;
            }
            if(objParam.hasOwnProperty('image')) {
                objParam.image.source =oman_img;
            }
            objParam.country = "Oman";
        }
        if (objParam.nazwa_panstwa == "Pakistan" || objParam.nazwa_panstwa == "Pakistan") {
            objParam.nazwa = "Pakistan";

            if (objParam.hasOwnProperty('source')) {
                objParam.source = new pakistan_img().bitmapData;
            }
            if(objParam.hasOwnProperty('image')) {
                objParam.image.source =pakistan_img;
            }
            objParam.country = "Pakistan";
        }
        if (objParam.nazwa_panstwa == "Philippines" || objParam.nazwa_panstwa == "Filipiny") {
            objParam.nazwa = "Filipiny";

            if (objParam.hasOwnProperty('source')) {
                objParam.source = new filipiny_img().bitmapData;
            }
            if(objParam.hasOwnProperty('image')) {
                objParam.image.source =filipiny_img;
            }
            objParam.country = "Philippines";
        }
        if (objParam.nazwa_panstwa == "Qatar" || objParam.nazwa_panstwa == "Katar") {
            objParam.nazwa = "Katar";

            if (objParam.hasOwnProperty('source')) {
                objParam.source = new qatar_img().bitmapData;
            }
            if(objParam.hasOwnProperty('image')) {
                objParam.image.source =qatar_img;
            }
            objParam.country = "Qatar";
        }
        if (objParam.nazwa_panstwa == "Russian Federation" || objParam.nazwa_panstwa == "Federacja Rosyjska") {
            objParam.nazwa = "Federacja Rosyjska";

            if (objParam.hasOwnProperty('source')) {
                objParam.source = new rosja_img().bitmapData;
            }
            if(objParam.hasOwnProperty('image')) {
                objParam.image.source =rosja_img;
            }
            objParam.country = "Russian Federation";
        }
        if (objParam.nazwa_panstwa == "Saudi Arabia" || objParam.nazwa_panstwa == "Arabia Saudyjska") {
            objParam.nazwa = "Arabia Saudyjska";

            if (objParam.hasOwnProperty('source')) {
                objParam.source = new arabia_saudyjska_img().bitmapData;
            }
            if(objParam.hasOwnProperty('image')) {
                objParam.image.source =arabia_saudyjska_img;
            }
            objParam.country = "Saudi Arabia";
        }
        if (objParam.nazwa_panstwa == "Singapore" || objParam.nazwa_panstwa == "Singapur") {
            objParam.nazwa = "Singapur";

            if (objParam.hasOwnProperty('source')) {
                objParam.source = new singapur_img().bitmapData;
            }
            if(objParam.hasOwnProperty('image')) {
                objParam.image.source =singapur_img;
            }
            objParam.country = "Singapore";
        }
        if (objParam.nazwa_panstwa == "Sri Lanka" || objParam.nazwa_panstwa == "Sri Lanka") {
            objParam.nazwa = "Sri Lanka";

            if (objParam.hasOwnProperty('source')) {
                objParam.source = new sri_lanka_img().bitmapData;
            }
            if(objParam.hasOwnProperty('image')) {
                objParam.image.source =sri_lanka_img;
            }
            objParam.country = "Sri Lanka";
        }
        if (objParam.nazwa_panstwa == "Syrian Arab Republic" || objParam.nazwa_panstwa == "Syria") {
            objParam.nazwa = "Syria";

            if (objParam.hasOwnProperty('source')) {
                objParam.source = new syria_img().bitmapData;
            }
            if(objParam.hasOwnProperty('image')) {
                objParam.image.source =syria_img;
            }
            objParam.country = "Syrian Arab Republic";
        }
        if (objParam.nazwa_panstwa == "Taiwan" || objParam.nazwa_panstwa == "Tajwan") {
            objParam.nazwa = "Tajwan";

            if (objParam.hasOwnProperty('source')) {
                objParam.source = new taiwan_img().bitmapData;
            }
            if(objParam.hasOwnProperty('image')) {
                objParam.image.source =taiwan_img;
            }
            objParam.country = "Taiwan";
        }
        if (objParam.nazwa_panstwa == "Tajikistan" || objParam.nazwa_panstwa == "Tadżykistan") {
            objParam.nazwa = "Tadżykistan";

            if (objParam.hasOwnProperty('source')) {
                objParam.source = new tadzykistan_img().bitmapData;
            }
            if(objParam.hasOwnProperty('image')) {
                objParam.image.source =tadzykistan_img;
            }
            objParam.country = "Tajikistan";
        }
        if (objParam.nazwa_panstwa == "Thailand" || objParam.nazwa_panstwa == "Tajlandia") {
            objParam.nazwa = "Tajlandia";

            if (objParam.hasOwnProperty('source')) {
                objParam.source = new tajlandia_img().bitmapData;
            }
            if(objParam.hasOwnProperty('image')) {
                objParam.image.source =tajlandia_img;
            }
            objParam.country = "Thailand";
        }
        if (objParam.nazwa_panstwa == "Turkey" || objParam.nazwa_panstwa == "Turcja") {
            objParam.nazwa = "Turcja";

            if (objParam.hasOwnProperty('source')) {
                objParam.source = new turcja_img().bitmapData;
            }
            if(objParam.hasOwnProperty('image')) {
                objParam.image.source =turcja_img;
            }
            objParam.country = "Turkey";
        }
        if (objParam.nazwa_panstwa == "Turkmenistan" || objParam.nazwa_panstwa == "Turkmenistan") {
            objParam.nazwa = "Turkmenistan";

            if (objParam.hasOwnProperty('source')) {
                objParam.source = new turkmenistan_img().bitmapData;
            }
            if(objParam.hasOwnProperty('image')) {
                objParam.image.source =turkmenistan_img;
            }
            objParam.country = "Turkmenistan";
        }
        if (objParam.nazwa_panstwa == "United Arab Emirates" || objParam.nazwa_panstwa == "Zjednoczone Emiraty Arabskie") {
            objParam.nazwa = "Zjednoczone Emiraty Arabskie";

            if (objParam.hasOwnProperty('source')) {
                objParam.source = new zjednoczone_emiraty_arabskie_img().bitmapData;
            }
            if(objParam.hasOwnProperty('image')) {
                objParam.image.source =zjednoczone_emiraty_arabskie_img;
            }
            objParam.country = "United Arab Emirates";
        }
        if (objParam.nazwa_panstwa == "Uzbekistan" || objParam.nazwa_panstwa == "Uzbekistan") {
            objParam.nazwa = "Uzbekistan";

            if (objParam.hasOwnProperty('source')) {
                objParam.source = new uzbekistan_img().bitmapData;
            }
            if(objParam.hasOwnProperty('image')) {
                objParam.image.source =uzbekistan_img;
            }
            objParam.country = "Uzbekistan";
        }
        if (objParam.nazwa_panstwa == "Vietnam" || objParam.nazwa_panstwa == "Wietnam") {
            objParam.nazwa = "Wietnam";

            if (objParam.hasOwnProperty('source')) {
                objParam.source = new wietnam_img().bitmapData;
            }
            if(objParam.hasOwnProperty('image')) {
                objParam.image.source =wietnam_img;
            }
            objParam.country = "Vietnam";
        }
        if (objParam.nazwa_panstwa == "Yemen" || objParam.nazwa_panstwa == "Jemen") {
            objParam.nazwa = "Jemen";

            if (objParam.hasOwnProperty('source')) {
                objParam.source = new jemen_img().bitmapData;
            }
            if(objParam.hasOwnProperty('image')) {
                objParam.image.source =jemen_img;
            }
            objParam.country = "Yemen";
        }

        /*********************   /Azja    *******************/

        /*********************   Afryka    *******************/
        if (objParam.nazwa_panstwa == "Algeria" || objParam.nazwa_panstwa == "Algeria") {
            objParam.nazwa = "Algeria";

            if (objParam.hasOwnProperty('source')) {
                objParam.source = new algieria_img().bitmapData;
            }
            if(objParam.hasOwnProperty('image')) {
                objParam.image.source =algieria_img;
            }
            objParam.country = "Algeria";
        }
        if (objParam.nazwa_panstwa == "Angola" || objParam.nazwa_panstwa == "Angola") {
            objParam.nazwa = "Angola";

            if (objParam.hasOwnProperty('source')) {
                objParam.source = new angola_img().bitmapData;
            }
            if(objParam.hasOwnProperty('image')) {
                objParam.image.source =angola_img;
            }
            objParam.country = "Angola";
        }
        if (objParam.nazwa_panstwa == "Benin" || objParam.nazwa_panstwa == "Benin") {
            objParam.nazwa = "Benin";

            if (objParam.hasOwnProperty('source')) {
                objParam.source = new benin_img().bitmapData;
            }
            if(objParam.hasOwnProperty('image')) {
                objParam.image.source =benin_img;
            }
            objParam.country = "Benin";
        }
        if (objParam.nazwa_panstwa == "Botswana" || objParam.nazwa_panstwa == "Botswana") {
            objParam.nazwa = "Botswana";

            if (objParam.hasOwnProperty('source')) {
                objParam.source = new botswana_img().bitmapData;
            }
            if(objParam.hasOwnProperty('image')) {
                objParam.image.source =botswana_img;
            }
            objParam.country = "Botswana";
        }
        if (objParam.nazwa_panstwa == "Cameroon" || objParam.nazwa_panstwa == "Kamerun") {
            objParam.nazwa = "Kamerun";

            if (objParam.hasOwnProperty('source')) {
                objParam.source = new Kamerun_img().bitmapData;
            }
            if(objParam.hasOwnProperty('image')) {
                objParam.image.source =Kamerun_img;
            }
            objParam.country = "Cameroon";
        }
        if (objParam.nazwa_panstwa == "Congo, Dem. Rep." || objParam.nazwa_panstwa == "Republika Demokratyczna Kongo" || objParam.nazwa_panstwa == 'Congo Democratic Republic') {
            objParam.nazwa = "Republika Demokratyczna Kongo";

            if (objParam.hasOwnProperty('source')) {
                objParam.source = new republika_demokratyczna_kongo_img().bitmapData;
            }
            if(objParam.hasOwnProperty('image')) {
                objParam.image.source =republika_demokratyczna_kongo_img;
            }
            objParam.country = "Congo Democratic Republic";
        }
        if (objParam.nazwa_panstwa == "Congo Republic" || objParam.nazwa_panstwa == "Republika Kongo" || objParam.nazwa_panstwa == "Congo") {
            objParam.nazwa = "Republika Kongo";

            if (objParam.hasOwnProperty('source')) {
                objParam.source = new republika_kongo_img().bitmapData;
            }
            if(objParam.hasOwnProperty('image')) {
                objParam.image.source = republika_kongo_img;
            }
            objParam.country = "Congo Republic";
        }
        if (objParam.nazwa_panstwa == "Cote d''Ivoire" || objParam.nazwa_panstwa == "Wybrzeże Kości Słoniowej" || objParam.nazwa_panstwa == 'IvoryCoast') {
            objParam.nazwa = "Wybrzeże Kości Słoniowej";

            if (objParam.hasOwnProperty('source')) {
                objParam.source = new polska_img().bitmapData;
            }
            if(objParam.hasOwnProperty('image')) {
                objParam.image.source =polska_img;
            }
            objParam.country = "IvoryCoast";
        }
        if (objParam.nazwa_panstwa == "Egypt" || objParam.nazwa_panstwa == "Egipt" || objParam.nazwa_panstwa == 'Egypt') {
            objParam.nazwa = "Egipt";

            if (objParam.hasOwnProperty('source')) {
                objParam.source = new egipt_img().bitmapData;
            }
            if(objParam.hasOwnProperty('image')) {
                objParam.image.source =egipt_img;
            }
            objParam.country = "Egypt";
        }
        if (objParam.nazwa_panstwa == "Ethiopia" || objParam.nazwa_panstwa == "Etiopia") {
            objParam.nazwa = "Etiopia";

            if (objParam.hasOwnProperty('source')) {
                objParam.source = new etiopia_img().bitmapData;
            }
            if(objParam.hasOwnProperty('image')) {
                objParam.image.source =etiopia_img;
            }
            objParam.country = "Ethiopia";
        }
        if (objParam.nazwa_panstwa == "Gabon" || objParam.nazwa_panstwa == "Gabon") {
            objParam.nazwa = "Gabon";

            if (objParam.hasOwnProperty('source')) {
                objParam.source = new gabon_img().bitmapData;
            }
            if(objParam.hasOwnProperty('image')) {
                objParam.image.source =gabon_img;
            }
            objParam.country = "Gabon";
        }
        if (objParam.nazwa_panstwa == "Ghana" || objParam.nazwa_panstwa == "Ghana") {
            objParam.nazwa = "Ghana";

            if (objParam.hasOwnProperty('source')) {
                objParam.source = new ghana_img().bitmapData;
            }
            if(objParam.hasOwnProperty('image')) {
                objParam.image.source =ghana_img;
            }
            objParam.country = "Ghana";
        }
        if (objParam.nazwa_panstwa == "Kenya" || objParam.nazwa_panstwa == "Kenia") {
            objParam.nazwa = "Kenia";

            if (objParam.hasOwnProperty('source')) {
                objParam.source = new kenia_img().bitmapData;
            }
            if(objParam.hasOwnProperty('image')) {
                objParam.image.source =kenia_img;
            }
            objParam.country = "Kenya";
        }
        if (objParam.nazwa_panstwa == "Libya" || objParam.nazwa_panstwa == "Libia") {
            objParam.nazwa = "Libia";

            if (objParam.hasOwnProperty('source')) {
                objParam.source = new libia_img().bitmapData;
            }
            if(objParam.hasOwnProperty('image')) {
                objParam.image.source =libia_img;
            }
            objParam.country = "Libya";
        }
        if (objParam.nazwa_panstwa == "Morocco" || objParam.nazwa_panstwa == "Maroko") {
            objParam.nazwa = "Maroko";

            if (objParam.hasOwnProperty('source')) {
                objParam.source = new maroko_img().bitmapData;
            }
            if(objParam.hasOwnProperty('image')) {
                objParam.image.source =maroko_img;
            }
            objParam.country = "Morocco";
        }
        if (objParam.nazwa_panstwa == "Mozambique" || objParam.nazwa_panstwa == "Mozambik") {
            objParam.nazwa = "Mozambik";

            if (objParam.hasOwnProperty('source')) {
                objParam.source = new mozambik_img().bitmapData;
            }
            if(objParam.hasOwnProperty('image')) {
                objParam.image.source =mozambik_img;
            }
            objParam.country = "Mozambique";
        }
        if (objParam.nazwa_panstwa == "Namibia" || objParam.nazwa_panstwa == "Namibia") {
            objParam.nazwa = "Namibia";

            if (objParam.hasOwnProperty('source')) {
                objParam.source = new namibia_img().bitmapData;
            }
            if(objParam.hasOwnProperty('image')) {
                objParam.image.source =namibia_img;
            }
            objParam.country = "Namibia";
        }
        if (objParam.nazwa_panstwa == "Nigeria" || objParam.nazwa_panstwa == "Nigeria") {
            objParam.nazwa = "Nigeria";

            if (objParam.hasOwnProperty('source')) {
                objParam.source = new nigeria_img().bitmapData;
            }
            if(objParam.hasOwnProperty('image')) {
                objParam.image.source =nigeria_img;
            }
            objParam.country = "Nigeria";
        }
        if (objParam.nazwa_panstwa == "Senegal" || objParam.nazwa_panstwa == "Senegal") {
            objParam.nazwa = "Senegal";

            if (objParam.hasOwnProperty('source')) {
                objParam.source = new senegal_img().bitmapData;
            }
            if(objParam.hasOwnProperty('image')) {
                objParam.image.source =senegal_img;
            }
            objParam.country = "Senegal";
        }
        if (objParam.nazwa_panstwa == "South Africa" || objParam.nazwa_panstwa == "Republika Południowej Afryki" || objParam.nazwa_panstwa == 'SouthAfrica') {
            objParam.nazwa = "Republika Południowej Afryki";

            if (objParam.hasOwnProperty('source')) {
                objParam.source = new rpa_img().bitmapData;
            }
            if(objParam.hasOwnProperty('image')) {
                objParam.image.source =rpa_img;
            }
            objParam.country = "South Africa";
        }
        if (objParam.nazwa_panstwa == "Sudan" || objParam.nazwa_panstwa == "Sudan") {
            objParam.nazwa = "Sudan";

            if (objParam.hasOwnProperty('source')) {
                objParam.source = new sudan_img().bitmapData;
            }
            if(objParam.hasOwnProperty('image')) {
                objParam.image.source =sudan_img;
            }
            objParam.country = "Sudan";
        }
        if (objParam.nazwa_panstwa == "Tanzania" || objParam.nazwa_panstwa == "Tanzania") {
            objParam.nazwa = "Tanzania";

            if (objParam.hasOwnProperty('source')) {
                objParam.source = new tanzania_img().bitmapData;
            }
            if(objParam.hasOwnProperty('image')) {
                objParam.image.source =tanzania_img;
            }
            objParam.country = "Tanzania";
        }
        if (objParam.nazwa_panstwa == "Togo" || objParam.nazwa_panstwa == "Togo") {
            objParam.nazwa = "Togo";

            if (objParam.hasOwnProperty('source')) {
                objParam.source = new togo_img().bitmapData;
            }
            if(objParam.hasOwnProperty('image')) {
                objParam.image.source =togo_img;
            }
            objParam.country = "Togo";
        }
        if (objParam.nazwa_panstwa == "Tunisia" || objParam.nazwa_panstwa == "Tunezja") {
            objParam.nazwa = "Tunezja";

            if (objParam.hasOwnProperty('source')) {
                objParam.source = new tunezja_img().bitmapData;
            }
            if(objParam.hasOwnProperty('image')) {
                objParam.image.source =tunezja_img;
            }
            objParam.country = "Tunisia";
        }
        if (objParam.nazwa_panstwa == "Trinidad and Tobago" || objParam.nazwa_panstwa == "Trinidad i Tobago") {
            objParam.nazwa = "Trinidad i Tobago";

            if (objParam.hasOwnProperty('source')) {
                objParam.source = new trynidad_tobago_img().bitmapData;
            }
            if(objParam.hasOwnProperty('image')) {
                objParam.image.source =trynidad_tobago_img;
            }
            objParam.country = "Trinidad and Tobago";
        }
        if (objParam.nazwa_panstwa == "Zambia" || objParam.nazwa_panstwa == "Zambia") {
            objParam.nazwa = "Zambia";

            if (objParam.hasOwnProperty('source')) {
                objParam.source = new zambia_img().bitmapData;
            }
            if(objParam.hasOwnProperty('image')) {
                objParam.image.source =zambia_img;
            }
            objParam.country = "Zambia";
        }
        if (objParam.nazwa_panstwa == "Zimbabwe" || objParam.nazwa_panstwa == "Zimbabwe") {
            objParam.nazwa = "Zimbabwe";

            if (objParam.hasOwnProperty('source')) {
                objParam.source = new zimbabwe_img().bitmapData;
            }
            if(objParam.hasOwnProperty('image')) {
                objParam.image.source =zimbabwe_img;
            }
            objParam.country = "Zimbabwe";
        }

        if (objParam.nazwa_panstwa == "Swaziland" || objParam.nazwa_panstwa == "Swaziland") {
            objParam.nazwa = "Swaziland";

            if (objParam.hasOwnProperty('source')) {
                objParam.source = new swaziland_img().bitmapData;
            }
            if(objParam.hasOwnProperty('image')) {
                objParam.image.source =swaziland_img;
            }
            objParam.country = "Swaziland";
        }
        if (objParam.nazwa_panstwa == "Czad" || objParam.nazwa_panstwa == "Chad") {
            objParam.nazwa = "Czad";

            if (objParam.hasOwnProperty('source')) {
                objParam.source = new czad_img().bitmapData;
            }
            if(objParam.hasOwnProperty('image')) {
                objParam.image.source =czad_img;
            }
            objParam.country = "Chad";
        }
        if (objParam.nazwa_panstwa == "Zachodnia Sachara" || objParam.nazwa_panstwa == "Zachodnia Sachara" || objParam.nazwa_panstwa == 'West Sahara') {
            objParam.nazwa = "Zachodnia Sachara";

            if (objParam.hasOwnProperty('source')) {
                objParam.source = new czad_img().bitmapData;
            }
            if(objParam.hasOwnProperty('image')) {
                objParam.image.source =czad_img;
            }
            objParam.country = "West Sahara";
        }
        if (objParam.nazwa_panstwa == "Mali" || objParam.nazwa_panstwa == "Mali") {
            objParam.nazwa = "Mali";

            if (objParam.hasOwnProperty('source')) {
                objParam.source = new mali_img().bitmapData;
            }
            if(objParam.hasOwnProperty('image')) {
                objParam.image.source =mali_img;
            }
            objParam.country = "Mali";
        }

        if (objParam.nazwa_panstwa == "Guinea" || objParam.nazwa_panstwa == "Gwinea") {
            objParam.nazwa = "Gwinea";

            if (objParam.hasOwnProperty('source')) {
                objParam.source = new gwinea_img().bitmapData;
            }
            if(objParam.hasOwnProperty('image')) {
                objParam.image.source =gwinea_img;
            }
            objParam.country = "Guinea";
        }
        if (objParam.nazwa_panstwa == "Burkina Faso" || objParam.nazwa_panstwa == "Burkina faso") {
            objParam.nazwa = "Burkina faso";

            if (objParam.hasOwnProperty('source')) {
                objParam.source = new burkina_faso_img().bitmapData;
            }
            if(objParam.hasOwnProperty('image')) {
                objParam.image.source =burkina_faso_img;
            }
            objParam.country = "Burkina Faso";
        }
        if (objParam.nazwa_panstwa == "Mauretania" || objParam.nazwa_panstwa == "Mauretania") {
            objParam.nazwa = "Mauretania";

            if (objParam.hasOwnProperty('source')) {
                objParam.source = new mauretania_img().bitmapData;
            }
            if(objParam.hasOwnProperty('image')) {
                objParam.image.source =mauretania_img;
            }
            objParam.country = "Mauretania";
        }
        if (objParam.nazwa_panstwa == "Liberia" || objParam.nazwa_panstwa == "Liberia") {
            objParam.nazwa = "Liberia";

            if (objParam.hasOwnProperty('source')) {
                objParam.source = new liberia_img().bitmapData;
            }
            if(objParam.hasOwnProperty('image')) {
                objParam.image.source =liberia_img;
            }
            objParam.country = "Liberia";
        }

        if (objParam.nazwa_panstwa == "Sierra Leone" || objParam.nazwa_panstwa == "Sierra Leone") {
            objParam.nazwa = "Sierra Leone";

            if (objParam.hasOwnProperty('source')) {
                objParam.source = new sierra_leone_img().bitmapData;
            }
            if(objParam.hasOwnProperty('image')) {
                objParam.image.source =sierra_leone_img;
            }
            objParam.country = "SierraLeone";
        }
        if (objParam.nazwa_panstwa == "Republika Nigru" || objParam.nazwa_panstwa == "Republika Nigru" || objParam.nazwa_panstwa == 'Niger') {
            objParam.nazwa = "Republika Nigru";

            if (objParam.hasOwnProperty('source')) {
                objParam.source = new niger_img().bitmapData;
            }
            if(objParam.hasOwnProperty('image')) {
                objParam.image.source =niger_img;
            }
            objParam.country = "Niger";
        }
        if (objParam.nazwa_panstwa == "Republika środkowoafrykańska" || objParam.nazwa_panstwa == "Republika środkowoafrykańska") {
            objParam.nazwa = "Republika środkowoafrykańska";

            if (objParam.hasOwnProperty('source')) {
                objParam.source = new republika_srodkowoafrykanska_img().bitmapData;
            }
            if(objParam.hasOwnProperty('image')) {
                objParam.image.source =republika_srodkowoafrykanska_img;
            }
            objParam.country = "Central African Republic";
        }
        if (objParam.nazwa_panstwa == "Gwinea równikowa" || objParam.nazwa_panstwa == "Equatorial Guinea") {
            objParam.nazwa = "Gwinea równikowa";

            if (objParam.hasOwnProperty('source')) {
                objParam.source = new gwinea_rownikowa_img().bitmapData;
            }
            if(objParam.hasOwnProperty('image')) {
                objParam.image.source =gwinea_rownikowa_img;
            }
            objParam.country = "Equatorial Guinea";
        }
        if (objParam.nazwa_panstwa == "Uganda" || objParam.nazwa_panstwa == "Uganda") {
            objParam.nazwa = "Uganda";

            if (objParam.hasOwnProperty('source')) {
                objParam.source = new uganda_img().bitmapData;
            }
            if(objParam.hasOwnProperty('image')) {
                objParam.image.source =uganda_img;
            }
            objParam.country = "Uganda";
        }
        if (objParam.nazwa_panstwa == "Somalia" || objParam.nazwa_panstwa == "Somalia") {
            objParam.nazwa = "Liberia";

            if (objParam.hasOwnProperty('source')) {
                objParam.source = new somalia_img().bitmapData;
            }
            if(objParam.hasOwnProperty('image')) {
                objParam.image.source =somalia_img;
            }
            objParam.country = "Somalia";
        }
        if (objParam.nazwa_panstwa == "Rwanda" || objParam.nazwa_panstwa == "Rwanda") {
            objParam.nazwa = "Rwanda";

            if (objParam.hasOwnProperty('source')) {
                objParam.source = new somalia_img().bitmapData;
            }
            if(objParam.hasOwnProperty('image')) {
                objParam.image.source =somalia_img;
            }
            objParam.country = "Rwanda";
        }
        if (objParam.nazwa_panstwa == "Madagaskar" || objParam.nazwa_panstwa == "Madagascar") {
            objParam.nazwa = "Madagaskar";

            if (objParam.hasOwnProperty('source')) {
                objParam.source = new madagaskar_img().bitmapData;
            }
            if(objParam.hasOwnProperty('image')) {
                objParam.image.source =madagaskar_img;
            }
            objParam.country = "Madagascar";
        }
        if (objParam.nazwa_panstwa == "Erytrea" || objParam.nazwa_panstwa == "Eritrea") {
            objParam.nazwa = "Erytrea";

            if (objParam.hasOwnProperty('source')) {
                objParam.source = new erytrea_img().bitmapData;
            }
            if(objParam.hasOwnProperty('image')) {
                objParam.image.source =erytrea_img;
            }
            objParam.country = "Eritrea";
        }
        if (objParam.nazwa_panstwa == "Lesotho" || objParam.nazwa_panstwa == "Lesotho") {
            objParam.nazwa = "Lesotho";

            if (objParam.hasOwnProperty('source')) {
                objParam.source = new lesotho_img().bitmapData;
            }
            if(objParam.hasOwnProperty('image')) {
                objParam.image.source =lesotho_img;
            }
            objParam.country = "Lesotho";
        }

        /*********************   /Afryka    *******************/
        /*********************   Australia    *******************/
        if (objParam.nazwa_panstwa == "Australia" || objParam.nazwa_panstwa == "Australia") {
            objParam.nazwa = "Australia";

            if (objParam.hasOwnProperty('source')) {
                objParam.source = new australia_img().bitmapData;
            }
            if(objParam.hasOwnProperty('image')) {
                objParam.image.source =australia_img;
            }
            objParam.country = "Australia";
        }
        if (objParam.nazwa_panstwa == "New Zealand" || objParam.nazwa_panstwa == "Nowa Zelandia") {
            objParam.nazwa = "Nowa Zelandia";

            if (objParam.hasOwnProperty('source')) {
                objParam.source = new nowa_zelandia_img().bitmapData;
            }
            if(objParam.hasOwnProperty('image')) {
                objParam.image.source =nowa_zelandia_img;
            }
            objParam.country = "New Zealand";
        }

        /*********************   /Australia    *******************/

        /*********************   Ameryka Północna i Centralna    *******************/
        if (objParam.nazwa_panstwa == "Canada" || objParam.nazwa_panstwa == "Kanada") {
            objParam.nazwa = "Kanada";

            if (objParam.hasOwnProperty('source')) {
                objParam.source = new kanada_img().bitmapData;
            }
            if(objParam.hasOwnProperty('image')) {
                objParam.image.source =kanada_img;
            }
            objParam.country = "Canada";
        }
        if (objParam.nazwa_panstwa == "Mexico" || objParam.nazwa_panstwa == "Meksyk") {
            objParam.nazwa = "Meksyk";

            if (objParam.hasOwnProperty('source')) {
                objParam.source = new meksyk_img().bitmapData;
            }
            if(objParam.hasOwnProperty('image')) {
                objParam.image.source =meksyk_img;
            }
            objParam.country = "Mexico";
        }
        if (objParam.nazwa_panstwa == "United States" || objParam.nazwa_panstwa == "USA") {
            objParam.nazwa = "USA";

            if (objParam.hasOwnProperty('source')) {
                objParam.source = new usa_img().bitmapData;
            }
            if(objParam.hasOwnProperty('image')) {
                objParam.image.source =usa_img;
            }
            objParam.country = "United States";
        }
        if (objParam.nazwa_panstwa == "Costa Rica" || objParam.nazwa_panstwa == "Kostaryka") {
            objParam.nazwa = "Kostaryka";

            if (objParam.hasOwnProperty('source')) {
                objParam.source = new kostaryka_img().bitmapData;
            }
            if(objParam.hasOwnProperty('image')) {
                objParam.image.source =kostaryka_img;
            }
            objParam.country = "Costa Rica";
        }
        if (objParam.nazwa_panstwa == "Cuba" || objParam.nazwa_panstwa == "Kuba") {
            objParam.nazwa = "Kuba";

            if (objParam.hasOwnProperty('source')) {
                objParam.source = new kuba_img().bitmapData;
            }
            if(objParam.hasOwnProperty('image')) {
                objParam.image.source =kuba_img;
            }
            objParam.country = "Cuba";
        }
        if (objParam.nazwa_panstwa == "El Salvador" || objParam.nazwa_panstwa == "Salwador") {
            objParam.nazwa = "Salwador";

            if (objParam.hasOwnProperty('source')) {
                objParam.source = new salvador_img().bitmapData;
            }
            if(objParam.hasOwnProperty('image')) {
                objParam.image.source =salvador_img;
            }
            objParam.country = "El Salvador";
        }
        if (objParam.nazwa_panstwa == "Guatemala" || objParam.nazwa_panstwa == "Gwatemala") {
            objParam.nazwa = "Gwatemala";

            if (objParam.hasOwnProperty('source')) {
                objParam.source = new gwatemala_img().bitmapData;
            }
            if(objParam.hasOwnProperty('image')) {
                objParam.image.source =gwatemala_img;
            }
            objParam.country = "Guatemala";
        }
        if (objParam.nazwa_panstwa == "Honduras" || objParam.nazwa_panstwa == "Honduras") {
            objParam.nazwa = "Honduras";

            if (objParam.hasOwnProperty('source')) {
                objParam.source = new honduras_img().bitmapData;
            }
            if(objParam.hasOwnProperty('image')) {
                objParam.image.source =honduras_img;
            }
            objParam.country = "Honduras";
        }
        if (objParam.nazwa_panstwa == "Nicaragua" || objParam.nazwa_panstwa == "Nikaragua") {
            objParam.nazwa = "Nikaragua";

            if (objParam.hasOwnProperty('source')) {
                objParam.source = new nikaragua_img().bitmapData;
            }
            if(objParam.hasOwnProperty('image')) {
                objParam.image.source =nikaragua_img;
            }
            objParam.country = "Nicaragua";
        }
        if (objParam.nazwa_panstwa == "Panama" || objParam.nazwa_panstwa == "Panama") {
            objParam.nazwa = "Panama";

            if (objParam.hasOwnProperty('source')) {
                objParam.source = new panama_img().bitmapData;
            }
            if(objParam.hasOwnProperty('image')) {
                objParam.image.source =panama_img;
            }
            objParam.country = "Panama";
        }
        if (objParam.nazwa_panstwa == "Dominican Republic" || objParam.nazwa_panstwa == "Republika Dominikany") {
            objParam.nazwa = "Republika Dominikany";

            if (objParam.hasOwnProperty('source')) {
                objParam.source = new dominikana_img().bitmapData;
            }
            if(objParam.hasOwnProperty('image')) {
                objParam.image.source =dominikana_img;
            }
            objParam.country = "Dominican Republic";
        }
        if (objParam.nazwa_panstwa == "Haiti" || objParam.nazwa_panstwa == "Haiti") {
            objParam.nazwa = "Haiti";

            if (objParam.hasOwnProperty('source')) {
                objParam.source = new haiti_img().bitmapData;
            }
            if(objParam.hasOwnProperty('image')) {
                objParam.image.source =haiti_img;
            }
            objParam.country = "Haiti";
        }
        if (objParam.nazwa_panstwa == "Jamaica" || objParam.nazwa_panstwa == "Jamajka") {
            objParam.nazwa = "Jamajka";

            if (objParam.hasOwnProperty('source')) {
                objParam.source = new jamajka_img().bitmapData;
            }
            if(objParam.hasOwnProperty('image')) {
                objParam.image.source =jamajka_img;
            }
            objParam.country = "Jamaica";
        }
        /*********************   /Ameryka Północna i Centralna   *******************/

        if (objParam.nazwa_panstwa == "Argentina" || objParam.nazwa_panstwa == "Argentyna") {
            objParam.nazwa = "Argentyna";

            if (objParam.hasOwnProperty('source')) {
                objParam.source = new argentyna_img().bitmapData;
            }
            if(objParam.hasOwnProperty('image')) {
                objParam.image.source =argentyna_img;
            }
            objParam.country = "Argentina";
        }
        if (objParam.nazwa_panstwa == "Bolivia" || objParam.nazwa_panstwa == "Boliwia") {
            objParam.nazwa = "Boliwia";

            if (objParam.hasOwnProperty('source')) {
                objParam.source = new boliwia_img().bitmapData;
            }
            if(objParam.hasOwnProperty('image')) {
                objParam.image.source =boliwia_img;
            }
            objParam.country = "Bolivia";
        }
        if (objParam.nazwa_panstwa == "Brazil" || objParam.nazwa_panstwa == "Brazylia") {
            objParam.nazwa = "Brazylia";

            if (objParam.hasOwnProperty('source')) {
                objParam.source = new brazylia_img().bitmapData;
            }
            if(objParam.hasOwnProperty('image')) {
                objParam.image.source =brazylia_img;
            }
            objParam.country = "Brazil";
        }
        if (objParam.nazwa_panstwa == "Chile" || objParam.nazwa_panstwa == "Chile") {
            objParam.nazwa = "Chile";

            if (objParam.hasOwnProperty('source')) {
                objParam.source = new chile_img().bitmapData;
            }
            if(objParam.hasOwnProperty('image')) {
                objParam.image.source =chile_img;
            }
            objParam.country = "Chile";
        }
        if (objParam.nazwa_panstwa == "Colombia" || objParam.nazwa_panstwa == "Kolumbia") {
            objParam.nazwa = "Kolumbia";

            if (objParam.hasOwnProperty('source')) {
                objParam.source = new kolumbia_img().bitmapData;
            }
            if(objParam.hasOwnProperty('image')) {
                objParam.image.source =  kolumbia_img;
            }
            objParam.country = "Colombia";
        }
        if (objParam.nazwa_panstwa == "Ecuador" || objParam.nazwa_panstwa == "Ekwador") {
            objParam.nazwa = "Ekwador";

            if (objParam.hasOwnProperty('source')) {
                objParam.source = new ekwador_img().bitmapData;
            }
            if(objParam.hasOwnProperty('image')) {
                objParam.image.source =  ekwador_img;
            }
            objParam.country = "Ecuador";
        }
        if (objParam.nazwa_panstwa == "Paraguay" || objParam.nazwa_panstwa == "Paragwaj") {
            objParam.nazwa = "Paragwaj";

            if (objParam.hasOwnProperty('source')) {
                objParam.source = new paragwaj_img().bitmapData;
            }
            if(objParam.hasOwnProperty('image')) {
                objParam.image.source =  paragwaj_img;
            }
            objParam.country = "Paraguay";
        }
        if (objParam.nazwa_panstwa == "Peru" || objParam.nazwa_panstwa == "Peru") {
            objParam.nazwa = "Peru";

            if (objParam.hasOwnProperty('source')) {
                objParam.source = new peru_img().bitmapData;
            }
            if(objParam.hasOwnProperty('image')) {
                objParam.image.source =  peru_img;
            }
            objParam.country = "Peru";
        }
        if (objParam.nazwa_panstwa == "Uruguay" || objParam.nazwa_panstwa == "Urugwaj") {
            objParam.nazwa = "Urugwaj";

            if (objParam.hasOwnProperty('source')) {
                objParam.source = new urugwaj_img().bitmapData;
            }
            if(objParam.hasOwnProperty('image')) {
                objParam.image.source =  urugwaj_img;
            }
            objParam.country = "Uruguay";
        }
        if (objParam.nazwa_panstwa == "Venezuela" || objParam.nazwa_panstwa == "Wenezuela") {
            objParam.nazwa = "Wenezuela";

            if (objParam.hasOwnProperty('source')) {
                objParam.source = new wenezuela_img().bitmapData;
            }
            if(objParam.hasOwnProperty('image')) {
                objParam.image.source = wenezuela_img;
            }
            objParam.country = "Venezuela";
        }

        if(objParam.hasOwnProperty('countryColor') && objParam.country != ""){
            objParam.countryColor = getCountryColor(objParam.country);
        }

    }


    public function FlagImageHelper() {
    }
}
}
